/**
  * The place to check if the data set in the snippet is valid
  * to generate the snippet.
  *
  * When invalid data should result in an error, you can throw it
  * here but you can also perform the check in the
  * checkRegistryRequestsAnswers() function from the
  * {@see \MUtil_Registry_TargetInterface}.
  *
  * @return boolean
  */
 public function hasHtmlOutput()
 {
     if (!$this->multiTracks) {
         return false;
     }
     if (!$this->trackData) {
         if (!$this->trackId) {
             if ($this->trackEngine instanceof \Gems_Tracker_Engine_TrackEngineInterface) {
                 $this->trackId = $this->trackEngine->getTrackId();
             } else {
                 return false;
             }
         }
         $trackModel = new \MUtil_Model_TableModel('gems__tracks');
         $this->trackData = $trackModel->loadFirst(array('gtr_id_track' => $this->trackId));
     } elseif (!$this->trackId) {
         $this->trackId = $this->trackData['gtr_id_track'];
     }
     return parent::hasHtmlOutput();
 }
 /**
  * The place to check if the data set in the snippet is valid
  * to generate the snippet.
  *
  * When invalid data should result in an error, you can throw it
  * here but you can also perform the check in the
  * checkRegistryRequestsAnswers() function from the
  * {@see \MUtil_Registry_TargetInterface}.
  *
  * @return boolean
  */
 public function hasHtmlOutput()
 {
     if ($this->request->getParam($this->confirmParameter)) {
         $this->performAction();
         $redirectRoute = $this->getRedirectRoute();
         return empty($redirectRoute);
     } else {
         return parent::hasHtmlOutput();
     }
 }
Пример #3
0
 /**
  * The place to check if the data set in the snippet is valid
  * to generate the snippet.
  *
  * When invalid data should result in an error, you can throw it
  * here but you can also perform the check in the
  * checkRegistryRequestsAnswers() function from the
  * {@see MUtil_Registry_TargetInterface}.
  *
  * @return boolean
  */
 public function hasHtmlOutput()
 {
     if (parent::hasHtmlOutput()) {
         return $this->processForm();
     }
 }