getConfig('type') == App_Newsletter_Form_Config::TYPE_DEFAULT) { if ((count($this->_restParams) != 0)) { $this->_doc->display404(); } } return parent::exec(); } protected function _doList() { if ($this->getConfig('type') == App_Newsletter_Form_Config::TYPE_DEFAULT) { $this->_addFilterItem(); } $this->_addListItem(); $this->_postList(); return $this; } /** * @param Qs_ViewController_List $list * @return mixed */ protected function _getListItem($list = null) { if (null == $list) { $list = $this->_getList(); } if ($this->getConfig('type') == App_Newsletter_Form_Config::TYPE_SMALL) { $list->setIpp($this->getConfig('smallListIpp')); $list->setListTemplate('small-list.tpl'); } $item = parent::_getListItem($list); $item['currentYear'] = $this->_getDataObj()->getFilter('year'); if (!$item['currentYear']) { $item['currentYear'] = date('Y'); } $item['downloadLogUrl'] = $this->_getDataObj()->getLogUrl($item['currentYear']); return $item; } /** * @param Qs_ViewController_List $list * @return App_Newsletter_View|Qs_ViewController */ protected function _addListItem($list = null) { $this->_addLinksItem(); $item = $this->_getListItem($list); $this->_addItem($item); return $this; } public function getSideBlockItem(array $blockData = array()) { $item = $this->_getListItem(); if (!empty($item['list'])) { return $item; } return null; } protected function _getLog() { if (null === $this->_log) { parent::_getLog(); $this->_log->setAction('list', 'Viewed ' . $this->_getDataObj()->getFilter('year') . ' Newsletters list'); $this->_log->setAction('download', 'Downloaded %itemTitle%'); } return $this->_log; } protected function _doDownloadAjax() { $this->_displayJson(array('success' => true)); } protected function _doDownload() { $this->_do404(); } }