'sorter ASC'); 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(); } 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); } }