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