Example #1
0
 /**
  * Insert applications defined controllers to local var
  */
 public function before()
 {
     foreach ($this->_apps as $app) {
         $this->_definedControllers[] = (string) $app->sys_name;
     }
     parent::before();
 }
Example #2
0
 /**
  * Prepare conditions to build content list
  * @throws NotFoundException
  */
 public function before()
 {
     // check length of passed terms
     if (!Obj::isString($this->_terms) || Str::length($this->_terms) < self::MIN_QUERY_LENGTH) {
         throw new NotFoundException(__('Search terms is too short'));
     }
     // lets make active record building
     $this->_records = ContentEntity::whereNotIn('id', $this->_skip)->search($this->_terms)->take(self::MAX_ITEMS)->get();
     $this->buildContent();
     parent::before();
 }