*/ class Mage_Newsletter_Model_Resource_Template_Collection extends Mage_Core_Model_Resource_Db_Collection_Abstract { /** * Define resource model and model * */ protected function _construct() { $this->_init('newsletter/template'); } /** * Load only actual template * * @return Mage_Newsletter_Model_Resource_Template_Collection */ public function useOnlyActual() { $this->addFieldToFilter('template_actual', 1); return $this; } /** * Returns options array * * @return array */ public function toOptionArray() { return $this->_toOptionArray('template_id', 'template_code'); } }