Lavary\Menu\Builder::group PHP Method

group() public method

Create a menu group with shared attributes.
public group ( array $attributes, callable $closure ) : void
$attributes array
$closure callable
return void
    public function group($attributes, $closure)
    {
        $this->updateGroupStack($attributes);
        // Once we have updated the group stack, we will execute the user Closure and
        // merge in the groups attributes when the item is created. After we have
        // run the callback, we will pop the attributes off of this group stack.
        call_user_func($closure, $this);
        array_pop($this->groupStack);
    }