'sorter ASC', 'defaultIpp' => 5); protected $_insertPlacement = 'APPEND'; 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(); } public function preDispatch(&$items) { if (count($this->getRestParams())) { foreach ($items as $k => $v) { if ($v['type'] == 'HtmlBlock_') { unset($items[$k]); } } } return $this; } 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); } }