Ejemplo n.º 1
0
 public function search(array $search, $sort, $select = null)
 {
     if (false === $this->getListOldEntries()) {
         $now = new DateTime();
         $select = $this->getSelect();
         $select->where->greaterThanOrEqualTo('dateTime', $now->format('Y-m-d H:i:s'));
     }
     return parent::search($search, $sort, $select);
 }
Ejemplo n.º 2
0
 /**
  * @param array $search
  * @param string $sort
  * @param Select $select
  * @return \Zend\Db\ResultSet\HydratingResultSet|\Zend\Db\ResultSet\ResultSet|\Zend\Paginator\Paginator
  */
 public function search(array $search, $sort, $select = null)
 {
     if (str_replace('-', '', $sort) == 'name') {
         if (strchr($sort, '-')) {
             $sort = ['-lastname', '-firstname'];
         } else {
             $sort = ['lastname', 'firstname'];
         }
     }
     return parent::search($search, $sort, $select);
 }
Ejemplo n.º 3
0
 public function search(array $search, $sort, $select = null)
 {
     $select = $this->getSelect();
     $select->join('article', 'news.articleId=article.articleId', array(), Select::JOIN_LEFT);
     return parent::search($search, $sort, $select);
 }