public function viewAction() { parent::viewAction(); $this->view->work = $work = $this->_getSubject(); $this->view->viewer = $viewer = Engine_Api::_()->user()->getViewer(); $chapterTbl = new Book_Model_DbTable_Chapters(); $chapterSelect = $chapterTbl->select()->where('work_id = ?', $work->getIdentity()); $workOwner = $work->getOwner(); if (!$workOwner->isSelf($viewer)) { $chapterSelect->where('published = ?', 1); } $this->view->paginator = $paginator = Zend_Paginator::factory($chapterSelect); $paginator->setCurrentPageNumber($this->_getParam('page', 1)); $this->_helper->content->setEnabled(); }
public function viewAction() { parent::viewAction(); /*$subject = $this->_getSubject(); $this->view->postTags = $subject->tags()->getTagMaps();*/ $this->_helper->content->setEnabled()->setNoRender(); }
public function viewAction() { parent::viewAction(); $subject = $this->_getSubject(); $popularity = Engine_Api::_()->getItemTable('book_popularity')->getObject($subject->getType(), $subject->getIdentity()); $popularity->view_count = $popularity->view_count + 1; $popularity->point = $popularity->point + Book_Plugin_Core::VIEW_POINT; $popularity->save(); $this->_helper->content->setNoRender()->setEnabled(); }