예제 #1
0
 /**
  * Retrieve initialized instance of XmlConnect application model
  *
  * @return Mage_XmlConnect_Model_Application
  */
 protected function _getConnectApp()
 {
     if (!$this->_connectApp) {
         $this->_connectApp = Mage::helper('xmlconnect')->getApplication();
         if (!$this->_connectApp) {
             $this->_connectApp = Mage::getModel('xmlconnect/application');
             $this->_connectApp->loadDefaultConfiguration();
         }
     }
     return $this->_connectApp;
 }
예제 #2
0
 /**
  * Init current application
  *
  * @return Mage_XmlConnect_Block_Configuration
  */
 protected function _beforeToHtml()
 {
     $app = Mage::helper('xmlconnect')->getApplication();
     if ($app) {
         $this->_app = $app;
     } else {
         $this->_app = Mage::getModel('xmlconnect/application');
         $this->_app->loadDefaultConfiguration();
     }
     return $this;
 }