예제 #1
0
 function getCompaniesByLetter()
 {
     $companiesTable = $this->getTable("Company");
     $categoryId = JRequest::getVar('categoryId');
     $companies = $companiesTable->getCompaniesByLetter($this->letter, $this->enablePackages, $this->showPendingApproval, $this->getState('limitstart'), $this->getState('limit'));
     foreach ($companies as $company) {
         $company->packageFeatures = explode(",", $company->features);
         $attributesTable = $this->getTable('CompanyAttributes');
         $company->customAttributes = $attributesTable->getCompanyAttributes($company->id);
     }
     if ($this->appSettings->enable_multilingual) {
         JBusinessDirectoryTranslations::updateBusinessListingsTranslation($companies);
         JBusinessDirectoryTranslations::updateBusinessListingsSloganTranslation($companies);
     }
     return $companies;
 }
예제 #2
0
파일: search.php 프로젝트: benji1979/teszt1
 function getItems()
 {
     $searchDetails = $this->getSearchParams();
     $companiesTable = $this->getTable("Company");
     //dump($this->getState('limitstart').' '.$this->getState('limit'));
     $companies = $companiesTable->getCompaniesByNameAndCategories($searchDetails, $this->getState('limitstart'), $this->getState('limit'));
     foreach ($companies as $company) {
         $company->packageFeatures = explode(",", $company->features);
     }
     foreach ($companies as $company) {
         $company->packageFeatures = explode(",", $company->features);
         $attributesTable = $this->getTable('CompanyAttributes');
         $company->customAttributes = $attributesTable->getCompanyAttributes($company->id);
     }
     if ($this->appSettings->enable_multilingual) {
         JBusinessDirectoryTranslations::updateBusinessListingsTranslation($companies);
         JBusinessDirectoryTranslations::updateBusinessListingsSloganTranslation($companies);
     }
     JRequest::setVar("search-results", $companies);
     return $companies;
 }