'y'); protected function _getFromColumns() { return array('id', 'type', 'title', 'image', 'html', 'backgroundImage', 'linkType', 'url', 'pageId', 'productId', 'linkText'); } protected function _prepareRow(array &$row) { parent::_prepareRow($row); switch ($row['linkType']) { case 'cms': $page = App_Cms_Obj::getInstance()->getPageById($row['pageId']); $row['url'] = BASE_URL . '/' . $page['fullAlias']; break; case 'product': $productObj = new App_ECommerce_Product_Obj(array('primaryKey' => $row['productId'])); $pageAlias = Qs_SiteMap::findFirst(null, array('type' => 'ECommerce_Product_'), array('forceAction' => 'view'), 'fullAlias'); $row['url'] = BASE_URL . '/' . $pageAlias . '/' . $productObj->getData('alias'); break; case 'link': break; case 'none': $row['url'] = ''; break; default: break; } return $this; } public function getListSelect() { return parent::getListSelect()->order($this->_tableAlias . '.sorter'); } }