
Public Member Functions | |
| toOptionArray () | |
| addStoreFilter ($store, $withAdmin=true) | |
Protected Member Functions | |
| _construct () | |
Definition at line 35 of file Collection.php.
| _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
| int|Mage_Core_Model_Store | $store |
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 }
1.5.8