Example #1
0
 /**
  * Retrieve collection instance from object model
  *
  * @return Mzax_Emarketing_Model_Object_Collection
  */
 public function getCollection()
 {
     if (!$this->_collection) {
         /* @var $collection Mzax_Emarketing_Model_Object_Collection */
         $this->_collection = Mage::getModel('mzax_emarketing/object_collection');
         $this->_collection->setObject($this->getParentObject());
         $this->_collection->setQuery($this->getPreparedQuery());
         $this->_prepareCollection($this->_collection);
     }
     return $this->_collection;
 }
Example #2
0
 /**
  * Prepare collection for use in object grid
  * 
  * @param Mzax_Emarketing_Model_Object_Collection $collection
  * @see Mzax_Emarketing_Model_Object_Abstract::prepareGridColumns()
  * @return void
  */
 public function prepareCollection(Mzax_Emarketing_Model_Object_Collection $collection)
 {
     $collection->setObject($this);
 }