Пример #1
0
 public function prepareQueryBeforeCount(xPDOQuery $c)
 {
     $c = parent::prepareQueryBeforeCount($c);
     $where = array();
     $where['res'] = $this->getProperty('res');
     $where['language'] = $this->getOption('cultureKey');
     $c->where($where);
     return $c;
 }
Пример #2
0
 public function prepareQueryBeforeCount(xPDOQuery $c)
 {
     $c = parent::prepareQueryBeforeCount($c);
     $where = array();
     if (!$this->getProperty('showinactive')) {
         $where['active'] = 1;
     }
     if ($ctx = $this->getOption('context')) {
         $c->andCondition(array("{$this->classKey}.context:REGEXP" => "(^|.+,){$ctx}(,.+|\$)"));
     }
     $c->where($where);
     return $c;
 }