select; } $select->from($this->_getPair(), array('title', 'file', 'added')); return $select; } protected function _join(Zend_Db_Select $select = null) { if (null === $select) { $select = $this->select; } $select->join(array('pg' => $this->_getTableName("{$this->_tableAlias}2Page")), "`pg`.`idAppFile` = `{$this->_tableAlias}`.`id`", array()); return $select; } protected function _where(Zend_Db_Select $select = null) { $select = parent::_where(); $select->where('`pg`.`idPage` = ' . $this->_idPage); return $select; } protected function _prepareList(&$list) { parent::_prepareList($list); foreach ($list as &$row) { $row['exp'] = '.' . array_pop(explode('.', $row['file'])); } return true; } public function setIdPage($id) { $this->_idPage = $id; return $this; } protected function _filterWhere(Zend_Db_Select $select) { $select = parent::_filterWhere($select); if (!empty($this->_filter['showOnPage'])) { $select->where("`showOnPage` = " . $this->db->quote($this->_filter['showOnPage'])); } return $select; } }