Exemplo n.º 1
0
 /**
  * @param string|null $modelClass
  */
 function __construct($modelClass = null)
 {
     $this->di = DI::getDefault();
     $this->modelClass = $modelClass;
     if (is_null(static::$current)) {
         static::$current = $this;
         $this->level(0);
     } else {
         static::$current->addItem($this);
         $this->level(static::$current->level() + 1);
     }
 }
Exemplo n.º 2
0
 /**
  * @return MenuItem[]
  */
 public function getMenu()
 {
     return $this->menu->items();
 }