/** * Prepares data for view */ public function show() { $aPageInfo = array(); $aPageInfo['template_title'] = $this->_oPage->getTemplate()->title; $aPageInfo['template_description'] = $this->_oPage->getTemplate()->description; $aPageInfo['canDelete'] = $this->_oPage->canDelete(); $aPageInfo['tocItem'] = $this->_oPage->toc; $aPageInfo['tocList'] = $this->_getTocList(); $aPageInfo['tags'] = $this->_getTags(); if ($this->_oPage->getIssue()->getApplication()->type != AM_Model_Db_ApplicationType::TYPE_RUE98WE) { $aPageInfo['canChangeTemplate'] = $this->_oPage->template == AM_Model_Db_Template::TPL_COVER_PAGE ? false : true; } else { $aPageInfo['canChangeTemplate'] = true; } $aPageInfo = array_merge($aPageInfo, $this->_oPage->toArray()); if ($this->_oPage->getOrientation() == AM_Model_Db_Issue::ORIENTATION_HORIZONTAL || $this->_oPage->getIssue()->static_pdf_mode == AM_Model_Db_Issue::HORISONTAL_MODE_NONE || empty($this->_oPage->getIssue()->static_pdf_mode)) { $aPageInfo['showPdfPage'] = false; } else { $aPageInfo['showPdfPage'] = true; } $sName = $this->getName(); if (isset($this->oView->{$sName})) { $aPageInfo = array_merge($aPageInfo, $this->oView->{$sName}); } $this->oView->{$sName} = $aPageInfo; }
/** * @param AM_Model_Db_Field $oField * @param AM_Model_Db_Page $oPage */ public function __construct(AM_Model_Db_Field $oField, AM_Model_Db_Page $oPage) { $this->_oField = $oField; $this->_oPage = $oPage; $this->_sPageOrientation = $oPage->getOrientation(); }