protected function applyModelToView() { parent::applyModelToView(); if ($this->Failed) { $this->view->failed = true; } if ($this->Disabled) { $this->view->disabled = true; } }
protected function applyModelToView() { parent::applyModelToView(); $this->view->hasNoSurvey = true; if (isset($this->model->SurveyID)) { try { $survey = $this->getSurvey(); $this->view->title = $survey->Title; $this->view->question = "1. How tall is a tree?"; $this->view->hasNoSurvey = false; } catch (RecordNotFoundException $er) { } } }