public function viewAction() { $id = (int) $this->getParam('id'); $record = Journal::find($id); if (!$record instanceof Journal) { throw new \FA\Exception('Journal not found!'); } $this->view->journal = $record; $this->_getUser($record->user); $this->_logPageView(); $this->_enforceNoGuests(); // TODO: Rewrite }