Mage_Newsletter_Model_Mysql4_Template_Collection Class Reference

Inheritance diagram for Mage_Newsletter_Model_Mysql4_Template_Collection:

Varien_Data_Collection_Db Varien_Data_Collection

List of all members.

Public Member Functions

 __construct ()
 useOnlyActual ()
 toOptionArray ()

Protected Attributes

 $_templateTable


Detailed Description

Definition at line 34 of file Collection.php.


Constructor & Destructor Documentation

__construct (  ) 

Reimplemented from Varien_Data_Collection.

Definition at line 43 of file Collection.php.

00044     {
00045         parent::__construct(Mage::getSingleton('core/resource')->getConnection('newsletter_read'));
00046         $this->_templateTable = Mage::getSingleton('core/resource')->getTableName('newsletter/template');
00047         $this->_select->from($this->_templateTable, array('template_id','template_code',
00048                                                              'template_type',
00049                                                              'template_subject','template_sender_name',
00050                                                              'template_sender_email',
00051                                                              'added_at',
00052                                                              'modified_at'
00053                                                              ));
00054         $this->setItemObjectClass(Mage::getConfig()->getModelClassName('newsletter/template'));
00055     }


Member Function Documentation

toOptionArray (  ) 

Reimplemented from Varien_Data_Collection.

Definition at line 69 of file Collection.php.

00070     {
00071         return $this->_toOptionArray('template_id', 'template_code');
00072     }

useOnlyActual (  ) 

Load only actual template

Returns:
Mage_Newsletter_Model_Mysql4_Template_Collection

Definition at line 62 of file Collection.php.

00063     {
00064         $this->_select->where('template_actual=?', 1);
00065         
00066         return $this;
00067     }


Member Data Documentation

$_templateTable [protected]

Definition at line 41 of file Collection.php.


The documentation for this class was generated from the following file:

Generated on Sat Jul 4 17:24:29 2009 for Magento by  doxygen 1.5.8