/**
  * Get the respondent object
  *
  * @return \Gems_Tracker_Respondent
  */
 protected function getRespondent()
 {
     if (!$this->_respondent) {
         $id = $this->_getParam(\Gems_Model::APPOINTMENT_ID);
         if ($id && !($this->_getParam(\MUtil_Model::REQUEST_ID1) || $this->_getParam(\MUtil_Model::REQUEST_ID2))) {
             $appointment = $this->loader->getAgenda()->getAppointment($id);
             $this->_respondent = $appointment->getRespondent();
             if (!$this->_respondent->exists) {
                 throw new \Gems_Exception($this->_('Unknown respondent.'));
             }
             $this->_respondent->applyToMenuSource($this->menu->getParameterSource());
         } else {
             $this->_respondent = parent::getRespondent();
         }
     }
     return $this->_respondent;
 }
 /**
  * Initialize translate and html objects
  *
  * Called from {@link __construct()} as final step of object instantiation.
  *
  * @return void
  */
 public function init()
 {
     parent::init();
     // Tell the system where to return to after a survey has been taken
     $this->currentUser->setSurveyReturn($this->getRequest());
 }
 /**
  * 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);
     $where = \Gems_Snippets_AutosearchFormSnippet::getPeriodFilter($filter, $this->db);
     if ($where) {
         $filter[] = $where;
     }
     return $filter;
 }
 /**
  * Delete a single token
  */
 public function undeleteAction()
 {
     $this->deleteParameters = $this->deleteParameters + $this->defaultTokenParameters;
     $this->deleteSnippets = $this->getToken()->getDeleteSnippetNames();
     parent::deleteAction();
 }