dashboardController = $dashboardController; $this->categoryRepository = $categoryRepository; $this->typeRepository = $typeRepository; $this->urlRepository = $urlRepository; } public function persistDataToDBAction($termsList, $category, $type, $url){ if(!($category === '')){ $category = ($this->categoryRepository->findByUid($category))->getTitle(); } if(!($type === '')){ $type = ($this->typeRepository->findByUid($type))->getTitle(); } if(!($url === '')){ $url = ($this->urlRepository->findByUid($url))->getTitle(); } $this->dashboardController->createAction($termsList, $category, $type, $url); } }