Пример #1
0
 public function index()
 {
     $filter = $this->input->get('filter', '', 'array');
     $settings = \Search\Models\Settings::fetch();
     if (empty($filter)) {
         $this->allSearch();
     } else {
         $this->filteredSearch();
     }
 }
Пример #2
0
 /**
  * 
  * @return string
  */
 public static function defaultSource()
 {
     $settings = \Search\Models\Settings::fetch();
     $global_app_name = \Base::instance()->get('APP_NAME');
     switch ($global_app_name) {
         case "admin":
             $default = $settings->default_admin_type;
             break;
         default:
             $default = $settings->default_site_type;
             break;
     }
     return $default;
 }