Mage_Cms_Model_Mysql4_Block_Collection Class Reference

Inheritance diagram for Mage_Cms_Model_Mysql4_Block_Collection:

Mage_Core_Model_Mysql4_Collection_Abstract Varien_Data_Collection_Db Varien_Data_Collection

List of all members.

Public Member Functions

 toOptionArray ()
 addStoreFilter ($store, $withAdmin=true)

Protected Member Functions

 _construct ()


Detailed Description

Definition at line 35 of file Collection.php.


Member Function Documentation

_construct (  )  [protected]

Initialization here

Reimplemented from Mage_Core_Model_Mysql4_Collection_Abstract.

Definition at line 38 of file Collection.php.

00039     {
00040         $this->_init('cms/block');
00041     }

addStoreFilter ( store,
withAdmin = true 
)

Add Filter by store

Parameters:
int|Mage_Core_Model_Store $store
Returns:
Mage_Cms_Model_Mysql4_Page_Collection

Definition at line 54 of file Collection.php.

00055     {
00056         if ($store instanceof Mage_Core_Model_Store) {
00057             $store = array($store->getId());
00058         }
00059 
00060         $this->getSelect()->join(
00061             array('store_table' => $this->getTable('cms/block_store')),
00062             'main_table.block_id = store_table.block_id',
00063             array()
00064         )
00065         ->where('store_table.store_id in (?)', ($withAdmin ? array(0, $store) : $store))
00066         ->group('main_table.block_id');
00067 
00068         return $this;
00069     }

toOptionArray (  ) 

Reimplemented from Varien_Data_Collection.

Definition at line 43 of file Collection.php.

00044     {
00045         return $this->_toOptionArray('block_id', 'title');
00046     }


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

Generated on Sat Jul 4 17:23:52 2009 for Magento by  doxygen 1.5.8