/**
  * Get the filter to use with the model for searching
  *
  * @param boolean $useRequest Use the request as source (when false, the session is used)
  * @return array or false
  */
 public function getSearchFilter($useRequest = true)
 {
     $filter = parent::getSearchFilter($useRequest);
     $selector = $this->getDateSelector();
     $output = $selector->getFilter($this->request, $filter);
     // \MUtil_Echo::track($filter, $output);
     return $output;
 }
 /**
  * Creates a model for getModel(). Called only for each new $action.
  *
  * The parameters allow you to easily adapt the model to the current action. The $detailed
  * parameter was added, because the most common use of action is a split between detailed
  * and summarized actions.
  *
  * @param boolean $detailed True when the current action is not in $summarizedActions.
  * @param string $action The current action.
  * @return \MUtil_Model_ModelAbstract
  */
 public function createModel($detailed, $action)
 {
     $model = parent::createModel($detailed, $action);
     $model->set('grs_birthday', 'label', $this->_('Birthday'));
     $model->set('grs_city', 'label', $this->_('City'));
     $model->addColumn("CONCAT(gr2t_completed, '" . $this->_(' of ') . "', gr2t_count)", 'progress');
     $model->set('progress', 'label', $this->_('Progress'));
     return $model;
 }
 /**
  * Get the data to use for searching: the values passed in the request + any defaults
  * used in the search form (or any other search request mechanism).
  *
  * It does not return the actual filter used in the query.
  *
  * @see getSearchFilter()
  *
  * @param boolean $useRequest Use the request as source (when false, the session is used)
  * @return array
  */
 public function getSearchData($useRequest = true)
 {
     $data = parent::getSearchData($useRequest);
     // Survey action data
     $data['gto_id_respondent'] = $this->getRespondentId();
     $data['gto_id_organization'] = $this->_getParam(\MUtil_Model::REQUEST_ID2);
     return $data;
 }