Lavary\Menu\Builder::group PHP 메소드

group() 공개 메소드

Create a menu group with shared attributes.
public group ( array $attributes, callable $closure ) : void
$attributes array
$closure callable
리턴 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);
    }