src/Platform/Menu.php
public function add(string $place, ItemMenu $itemMenu)
    {
        $arg = get_object_vars($itemMenu);

        if (array_key_exists('show', $arg) && ! $arg['show']) {
            return $this;
        }

        $this->location = $place;
        $this->arg = $arg;
        $this->sort = $arg['sort'];

        $this->item = [
            'location' => $this->location,
            'arg'      => $this->arg,
            'sort'     => $this->sort,
        ];

        $this->container[$this->arg['slug']] = $this->item;

        return $this;
    }
public function add(string $place, ItemMenu $itemMenu)
    {
        $arg = get_object_vars($itemMenu);

        if (array_key_exists('show', $arg) && ! $arg['show']) {
            return $this;
        }

        $this->location = $place;
        $this->arg = $arg;
        $this->sort = $arg['sort'];

        $this->item = [
            'location' => $this->location,
            'arg'      => $this->arg,
            'sort'     => $this->sort,
        ];

        $this->container[$this->arg['slug']] = $this->item;

        return $this;
    }
public function add ( string $ place , ItemMenu $ itemMenu ) { $ arg = get_object_vars ( $ itemMenu ) ; if ( array_key_exists ( 'show' , $ arg ) && ! $ arg [ 'show' ] ) { return $ this ; } $ this -> location = $ place ; $ this -> arg = $ arg ; $ this -> sort = $ arg [ 'sort' ] ; $ this -> item = [ 'location' => $ this -> location , 'arg' => $ this -> arg , 'sort' => $ this -> sort , ] ; $ this -> container [ $ this -> arg [ 'slug' ] ] = $ this -> item ; return $ this ; }
Adding a new element to the container.

@param string   $place
@param ItemMenu $itemMenu

@return $this
Adding a new element to the container .