_select) { $this->_select = parent::getListSelect(); $emptyTitle = $this->_db->quote(self::NO_CATEGORY_TITLE); $this->_select->joinLeft( $this->_getPair('FaqCategory'), '`FaqCategory`.`id` = `Faq`.`categoryId`', array( 'category' => 'IFNULL(`FaqCategory`.`title`, ' . $emptyTitle . ')', 'categoryEnabled' => 'IFNULL(`FaqCategory`.`enabled`, "y")' ) ); } return $this->_select; } public function getCategoriesCount() { $select = $this->_db->select(); $select->from($this->_getPair(), new Zend_Db_Expr('COUNT(DISTINCT `Faq`.`categoryId`)')); return (int) $this->_db->fetchOne($select); } public function getObjectInfo() { if (($info = parent::getObjectInfo())) { $info['itemTitle'] = $info['question']; } return $info; } }