function getSearchParameters() { $categoryService = new JBusinessDirectorCategoryLib(); $categoriesIds = null; if (!empty($this->categoryId)) { $categoriesIds = $categoryService->getCategoryLeafs($this->categoryId); if (count($categoriesIds) == 0 && isset($this->categoryId)) { $categoriesIds = array($this->categoryId); } else { $categoriesIds[] = $this->categoryId; } } //dump($categoriesIds); $searchDetails = array(); $searchDetails["keyword"] = $this->keyword; $searchDetails["categoriesIds"] = $categoriesIds; $searchDetails["startDate"] = JBusinessUtil::convertToMysqlFormat($this->startDate); $searchDetails["endDate"] = JBusinessUtil::convertToMysqlFormat($this->endDate); $searchDetails["typeSearch"] = $this->typeSearch; $searchDetails["enablePackages"] = $this->enablePackages; $searchDetails["showPendingApproval"] = $this->showPendingApproval; return $searchDetails; }