/**
  * STAGE 3: Choose, create, and optionally update models using business logic.
  * STAGE 4: Apply business logic to create a presentation model for the view.
  */
 protected function displayStage3_4()
 {
     // ZFDemoModel_Topics provides static methods that auto-instantiate and manage the model
     $this->view->topics = ZFDemoModel_Topics::getPresentationModel();
     $this->view->user = '******';
     // Controller = 'index', Action = 'index', param name = 'topic'
     $this->view->topicUrl = 'index/index/topic';
     $this->view->hide = false;
     /////////////////////////////
     // ==> SECTION: acl <==
     $role = ZFModule_Forum::getRole();
     // another form of access control (whether or not to show hidden posts)
     $this->view->hide = $role === 'moderator' || $role === 'admin' ? false : true;
 }
 /**
  * STAGE 3:  Choose, create, and optionally update models using business logic.
  * STAGE 4.  Apply business logic to create a presentation model for the view.
  */
 protected function displayStage3_4()
 {
     // the posts and topics models auto-instantiate themselves, as needed (STAGE 3)
     $this->view->posts = ZFDemoModel_Posts::getPostsByTopicId($this->topicId);
     $this->view->topicId = $this->topicId;
     // the posts and topics models auto-instantiate themselves, as needed (STAGE 3)
     $topic = ZFDemoModel_Topics::getPresentationModelByTopicId($this->topicId);
     $this->view->topicName = $topic->topic_name;
     $this->view->hide = false;
     /////////////////////////////
     // ==> SECTION: acl <==
     $role = ZFModule_Forum::getRole();
     // another form of access control (whether or not to show hidden posts)
     $this->view->hide = $role === 'moderator' || $role === 'admin' ? false : true;
 }