'sorter ASC', 'isDisabledLimit' => true); protected $_insertPlacement = 'APPEND'; public function preDispatch(&$items) { if (count($this->getRestParams())) { foreach ($items as $k => $v) { if ($v['type'] == 'HtmlBlock_') { unset($items[$k]); } } } return $this; } public function exec() { $params = $this->getRestParams(); $paramsCount = count($params); if (1 === $paramsCount && is_numeric($params[0])) { $this->dataObj->setPrimaryKey(intval($params[0])); $this->_defaultAction = 'view'; } else if ($paramsCount) { $this->doc->display404(); } return parent::exec(); } protected function _doView() { $item = $this->dataObj->getData(); if (empty($item)) { $this->doc->display404(); } $item['tpl'] = $this->getTemplate('view.tpl'); $item['backUrl'] = $this->_getBackUrl(CURRENT_PAGE_FINAL); if ($item['backUrl'] == '') { $item['backUrl'] = CURRENT_PAGE_FINAL; } $this->_addItem($item); } protected function _doList() { $this->doc->addScript('js/jquery-ui.js'); $this->doc->addScript('js/jquery.cookie.js'); $this->doc->addScript('js/app/accordion.js'); $this->doc->addScript('js/app/leadership.js'); $params = array( 'accordionOptions' => array( 'active' => false, 'autoHeight' => false, 'collapsible' => true ) ); $this->doc->addInitFunction('App_Leadership.init', array($params)); // акордион ініціалізується тут return parent::_doList(); } }