src/Menu/MenuGenerator.php
public function make($items, $classes = null)
    {
        if (is_string($items)) {
            $items = $this->config->get($items);
        }

        $menu = new Menu($this->url, $this->theme, $items);

        if (!is_null($this->lang)) {
            $menu->setLang($this->lang);
        }

        if (!is_null($this->accessHandler)) {
            $menu->setAccessHandler($this->accessHandler);
        }

        if ($classes != null) {
            $menu->setClass($classes);
        }

        if ($this->activeUrlResolver != null) {
            $menu->setActiveUrlResolver($this->activeUrlResolver);
        }

        return $menu;
    }
public function make($items, $classes = null)
    {
        if (is_string($items)) {
            $items = $this->config->get($items);
        }

        $menu = new Menu($this->url, $this->theme, $items);

        if (!is_null($this->lang)) {
            $menu->setLang($this->lang);
        }

        if (!is_null($this->accessHandler)) {
            $menu->setAccessHandler($this->accessHandler);
        }

        if ($classes != null) {
            $menu->setClass($classes);
        }

        if ($this->activeUrlResolver != null) {
            $menu->setActiveUrlResolver($this->activeUrlResolver);
        }

        return $menu;
    }
public function make ( $ items , $ classes = null ) { if ( is_string ( $ items ) ) { $ items = $ this -> config -> get ( $ items ) ; } $ menu = new Menu ( $ this -> url , $ this -> theme , $ items ) ; if ( ! is_null ( $ this -> lang ) ) { $ menu -> setLang ( $ this -> lang ) ; } if ( ! is_null ( $ this -> accessHandler ) ) { $ menu -> setAccessHandler ( $ this -> accessHandler ) ; } if ( $ classes != null ) { $ menu -> setClass ( $ classes ) ; } if ( $ this -> activeUrlResolver != null ) { $ menu -> setActiveUrlResolver ( $ this -> activeUrlResolver ) ; } return $ menu ; }
Makes a new menu.

As the first argument you can send an array of items or reference a
configuration key where you can store the items array.

@param array|string $items array of items or a config file key
@param string|null $classes main CSS classes for the menu

@return \Styde\Html\Menu\Menu
Makes a new menu .