protected function _applySearchParameters(\MUtil_Model_ModelAbstract $model, $useStored = false)
 {
     $data = $this->getCachedRequestData();
     // Make sure page and items parameters are not added to the search statement
     unset($data['page'], $data['items']);
     $data = $model->applyParameters($data);
     if ($filter = $this->getDataFilter($data)) {
         $model->addFilter($filter);
         // \MUtil_Echo::track($filter, $data, $model->getFilter());
     }
     if ($this->sortKey) {
         $model->addSort($this->sortKey);
     }
 }
Exemplo n.º 2
0
 /**
  * Overrule to implement snippet specific filtering and sorting.
  *
  * @param \MUtil_Model_ModelAbstract $model
  */
 protected function processFilterAndSort(\MUtil_Model_ModelAbstract $model)
 {
     if (false !== $this->searchFilter) {
         if (isset($this->searchFilter['limit'])) {
             $model->addFilter(array('limit' => $this->searchFilter['limit']));
             unset($this->searchFilter['limit']);
         }
         $model->applyParameters($this->searchFilter, true);
     } elseif ($this->request instanceof \Zend_Controller_Request_Abstract) {
         $model->applyRequest($this->request, $this->removePost, $this->includeNumericFilters);
     }
 }