where("`{$this->_tableAlias}`.`enabled` = 'y'"); return $select; } protected function _prepareList(&$list) { parent::_prepareList($list); if ($list) { $tmpList = array(); foreach ($list as $file) { $tmpList[$file['categoryId']][$file['id']] = $file; } $list = $tmpList; } return $list; } public static function getCategoryTitle($id) { $db = Qs_Db::getInstance(); $select = $db->select(); $select->from(array('SchoolResourceCategory' => Qs_Db::getTableName('SchoolResourceCategory')), array('title')); $select->where('id = ?', (int) $id, Qs_Db::INT_TYPE); return $db->fetchOne($select); } protected function _order(Zend_Db_Select $select = null) { return parent::_order($select)->order("categorySorter"); } }