'y' ); protected function _from(Zend_Db_Select $select = null) { if (null === $select) { $select = $this->select; } $select->from($this->pair, array('id', 'type', 'title', 'image', 'html', 'backgroundImage', 'linkType', 'url', 'idPage', 'linkText', 'showFilter')); return $select; } public function getList($options = array()) { $list = parent::getList($options); $this->_prepareList($list); return $list; } protected function _prepareList(&$list) { parent::_prepareList($list); foreach ($list as &$row) { $this->_prepareRow($row); } } protected function _prepareRow(&$row) { switch ($row['linkType']) { case 'cms': $page = App_Cms_Obj::getInstance()->getPageById($row['idPage']); $row['url'] = BASE_URL . '/' . $page['fullAlias']; break; case 'link': break; case 'none': $row['url'] = ''; break; default: break; } } public function getData($field = false) { $data = parent::getData($field); if (false === $field) { $this->_prepareRow($data); } return $data; } }