Beispiel #1
0
 /**
  * Load object data
  *
  * @param int $id
  * @param string $field
  * @return Mage_XmlConnect_Model_Queue
  */
 public function load($id, $field = null)
 {
     parent::load($id, $field);
     if ($this->getTemplateId()) {
         $this->setName(Mage::getModel('xmlconnect/template')->load($this->getTemplateId())->getName());
     }
     return $this;
 }
Beispiel #2
0
 /**
  * Load object data
  *
  * @param int $id
  * @param string $field
  * @return Mage_XmlConnect_Model_Queue
  */
 public function load($id, $field = null)
 {
     parent::load($id, $field);
     if (!$this->getTemplateId() && Mage::app()->getRequest()->getParam('template_id', false)) {
         $this->setTemplateId(Mage::app()->getRequest()->getParam('template_id'));
     }
     if ($this->getTemplateId()) {
         $template = Mage::getModel('xmlconnect/template')->load($this->getTemplateId());
         $this->setName($template->getName());
         $this->setApplicationId($template->getApplicationId());
     }
     return $this;
 }