Exemple #1
0
 /**
  * Inits with default items if any.
  */
 public function init()
 {
     parent::init();
     if (method_exists($this, 'items')) {
         $this->mergeItems($this->items());
     }
 }
Exemple #2
0
 /**
  * Initializes object with default items.
  *
  * Don not forget to call parent implementation when overriding this method.
  */
 public function init()
 {
     parent::init();
     $this->addItems($this->items());
     if (($add = $this->getAdd()) !== null) {
         $this->addMenus($add);
     }
     if (($merge = $this->getMerge()) !== null) {
         $this->mergeMenus($merge);
     }
 }