src/Menu.php
public function addGroup($title)
    {
        $group = $this->add([new self(), 'defaultTemplate' => 'menugroup.html', 'ui' => false]);
        if (is_string($title)) {
            $group->set('title', $title);
        } else {
            if (isset($title['icon']) && $title['icon']) {
                $group->add(new Icon($title['icon']), 'Icon')->removeClass('item');
            }
            $group->set('title', $title[0]);
        }

        return $group;
    }
public function addGroup($title)
    {
        $group = $this->add([new self(), 'defaultTemplate' => 'menugroup.html', 'ui' => false]);
        if (is_string($title)) {
            $group->set('title', $title);
        } else {
            if (isset($title['icon']) && $title['icon']) {
                $group->add(new Icon($title['icon']), 'Icon')->removeClass('item');
            }
            $group->set('title', $title[0]);
        }

        return $group;
    }
public function addGroup ( $ title ) { $ group = $ this -> add ( [ new self ( ) , 'defaultTemplate' => 'menugroup.html' , 'ui' => false ] ) ; if ( is_string ( $ title ) ) { $ group -> set ( 'title' , $ title ) ; } else { if ( isset ( $ title [ 'icon' ] ) && $ title [ 'icon' ] ) { $ group -> add ( new Icon ( $ title [ 'icon' ] ) , 'Icon' ) -> removeClass ( 'item' ) ; } $ group -> set ( 'title' , $ title [ 0 ] ) ; } return $ group ; }
Adds menu group.

@param string|array $title

@return Menu
Adds menu group .