Example #1
0
 /**
  * Add billing agreement filter
  *
  * @param mixed $argument
  * @throws DomainException
  * @return mixed
  */
 public function update($argument)
 {
     $billingAgreement = $this->_registryManager->registry('current_billing_agreement');
     if (!$billingAgreement) {
         throw new DomainException('Undefined billing agreement object');
     }
     $argument->addBillingAgreementsFilter($billingAgreement->getId());
     return $argument;
 }
Example #2
0
 /**
  * Retrieve currently edited product object
  *
  * @return mixed
  */
 private function getProduct()
 {
     return $this->_registryManager->registry('current_product');
 }
Example #3
0
 /**
  * Retrive email template model
  *
  * @return Mage_Core_Model_Email_Template
  */
 public function getEmailTemplate()
 {
     return $this->_registryManager->registry('current_email_template');
 }
Example #4
0
 /**
  *  Add filter by entity type id to collection
  *
  * @return Mage_Core_Model_Resource_Db_Collection_Abstract|Mage_Eav_Model_Resource_Entity_Attribute_Grid_Collection
  */
 protected function _initSelect()
 {
     parent::_initSelect();
     $this->setEntityTypeFilter($this->_registryManager->registry('entityType'));
     return $this;
 }
Example #5
0
 /**
  * Retrieve currently edited product object
  *
  * @return Mage_Catalog_Model_Product
  */
 protected function _getProduct()
 {
     return $this->_registryManager->registry('current_product');
 }