/**
  * @see SearchAppController::beforeFilter()
  */
 public function beforeFilter()
 {
     $companyIds = $this->Company->findAll();
     $companyIds = Hash::combine($companyIds, "{n}.identifier", "{n}.label");
     $this->set("canExportCSV", $this->OgAcl->canExportContactsSearchResults());
     $this->set("searchTitle", "O&M Client / Company Contacts");
     $this->set("companyIds", $companyIds);
     // FormHelper reads this variable and sets the options
     parent::beforeFilter();
 }
Esempio n. 2
0
 /**
  * Looks for config options overrides in Configure class
  * - Search.mode : type of MySQL search, natural or boolean
  * - Search.allowedChars : characters allowed in the search query
  */
 function beforeFilter()
 {
     // Search mode
     if ($mode = Configure::read('Search.mode')) {
         if (in_array($mode, array('natural', 'boolean'))) {
             $this->mode = $mode;
         }
     }
     // Query expansion
     if ($this->mode == 'natural' && Configure::read('Search.withQueryExpansion') !== null) {
         $this->withQueryExpansion = Configure::read('Search.withQueryExpansion');
     }
     // Allowed chars
     if ($allowedChars = Configure::read('Search.allowedChars')) {
         if (is_array($allowedChars)) {
             $this->allowedChars = $allowedChars;
         }
     }
     parent::beforeFilter();
 }
 /**
  * @see SearchAppController::beforeFilter()
  */
 public function beforeFilter()
 {
     $this->set("canExportCSV", $this->OgAcl->canExportOfficeSearchResults());
     parent::beforeFilter();
 }
 /**
  * @see SearchAppController::beforeFilter()
  */
 public function beforeFilter()
 {
     $this->set("canExportCSV", $this->OgAcl->canExportCompanySearchResults());
     $this->set("searchTitle", 'O&M Client / Company Roster');
     parent::beforeFilter();
 }