'sorter ASC', 'defaultIpp' => 10); public function preDispatch(&$items) { if (count($this->getRestParams())) { foreach ($items as $k => $v) { if ($v['type'] == 'HtmlBlock_') { unset($items[$k]); } } } return $this; } protected function _init() { $params = $this->getRestParams(); if (count($params) == 1 && is_numeric($params[0])) { $this->dataObj->setPrimaryKey($params[0]); $this->_defaultAction = 'view'; } return parent::_init(); } protected function _doView() { $item = $this->dataObj->getData(); $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 _getBackUrl($sessionName = null) { if (is_null($sessionName)){ $sessionName = CURRENT_PAGE; } $session = new Qs_Session_Namespace($sessionName); if (isset($session->backUrl)) { return $session->backUrl; } return ''; } }