Example #1
0
/**
     * Constructor
     *
     * @param   object  An optional KConfig object with configuration options
     */
    public function __construct(KConfig $config)
    {
        parent::__construct($config);

        // Set the static states
        $this->_state->limit = KFactory::get('joomla:application')->getCfg('list_limit');
    }
Example #2
0
 protected function _buildQueryWhere(KDatabaseQuery $query)
 {
     if ($this->_state->search) {
         $query->where('tbl.title', 'LIKE', '%' . $this->_state->search . '%');
     }
     if (is_numeric($this->_state->enabled)) {
         $query->where('tbl.enabled', '=', $this->_state->enabled);
     }
     parent::_buildQueryWhere($query);
 }
Example #3
0
 protected function _buildQueryWhere(KDatabaseQuery $query)
 {
     if ($this->_state->task) {
         $query->where('tbl.jedi_task_id', '=', (int) $this->_state->task);
     }
     if ($this->_state->member) {
         $query->where('tbl.jedi_member_id', '=', (int) $this->_state->member);
     }
     parent::_buildQueryWhere($query);
 }
Example #4
0
 protected function _buildQueryWhere(KDatabaseQuery $query)
 {
     parent::_buildQueryWhere($query);
     if (!$this->_state->isUnique()) {
         if ($this->_state->parent) {
             $parent = $this->getTable()->select($this->_state->parent, KDatabase::FETCH_ROW);
             $query->where('tbl.lft', '>', $parent->lft, 'AND')->where('tbl.rgt', '<', $parent->rgt);
         }
         if (!is_null($this->_state->core)) {
             $query->where('tbl.id', $this->_state->core ? '<=' : '>', 30);
         }
     }
 }
Example #5
0
 protected function _buildQueryWhere(KDatabaseQuery $query)
 {
     $state = $this->_state;
     if ($state->search) {
         $query->where('tbl.name', 'LIKE', '%' . $state->search . '%');
     }
     if (is_numeric($state->enabled)) {
         $query->where('tbl.enabled', '=', $state->enabled);
     }
     if (is_numeric($state->jedi_rank_id)) {
         $query->where('tbl.jedi_rank_id', '=', (int) $state->jedi_rank_id);
     }
     parent::_buildQueryWhere($query);
 }