Exemple #1
0
 /**
  * Get layout object
  *
  * @return Zend_Layout
  */
 public function getLayout()
 {
     if (null === $this->_layout) {
         require_once 'Zend/Layout.php';
         $this->_layout = Axis_Layout::getMvcInstance();
         if (null === $this->_layout) {
             // Implicitly creates layout object
             $this->_layout = new Zend_Layout();
         }
     }
     return $this->_layout;
 }
Exemple #2
0
 public function __construct($config = array())
 {
     if (null === self::$_view) {
         $this->setView(Axis_Layout::getMvcInstance()->getView());
     }
     list($namespace, $module, , $name) = explode('_', get_class($this));
     $this->_enabled = in_array($namespace . '_' . $module, array_keys(Axis::app()->getModules()));
     if (!$this->_enabled) {
         return;
     }
     $this->_data = array('box_namespace' => $namespace, 'box_module' => $module, 'box_name' => $name);
     $this->_enabled = $this->refresh()->setFromArray($config);
     if (!isset($config['supress_init'])) {
         // used at backend box configuration
         $this->init();
     }
 }
Exemple #3
0
 /**
  *  Main init
  */
 public function init()
 {
     parent::init();
     $this->db = Axis::db();
     $this->layout = Axis_Layout::getMvcInstance();
 }
Exemple #4
0
 /**
  *
  * @return Zend_View
  */
 public function getView()
 {
     if (null === self::$_view) {
         $this->setView(Axis_Layout::getMvcInstance()->getView());
     }
     return self::$_view;
 }