src/Charcoal/Admin/Widget/SecondaryMenuWidget.php
public function setGroups(array $groups)
    {
        $this->groups = [];

        foreach ($groups as $groupIdent => $group) {
            $this->addGroup($groupIdent, $group);
        }

        uasort($this->groups, [ $this, 'sortGroupsByPriority' ]);

        // Remove items that are not active.
        $this->groups = array_filter($this->groups, function($item) {
            return ($item->active());
        });

        return $this;
    }
public function setGroups(array $groups)
    {
        $this->groups = [];

        foreach ($groups as $groupIdent => $group) {
            $this->addGroup($groupIdent, $group);
        }

        uasort($this->groups, [ $this, 'sortGroupsByPriority' ]);

        // Remove items that are not active.
        $this->groups = array_filter($this->groups, function($item) {
            return ($item->active());
        });

        return $this;
    }
public function setGroups ( array $ groups ) { $ this -> groups = [ ] ; foreach ( $ groups as $ groupIdent => $ group ) { $ this -> addGroup ( $ groupIdent , $ group ) ; } uasort ( $ this -> groups , [ $ this , 'sortGroupsByPriority' ] ) ; // Remove items that are not active. $ this -> groups = array_filter ( $ this -> groups , function ( $ item ) { return ( $ item -> active ( ) ) ; } ) ; return $ this ; }
Set the secondary menu's groups.

@param  array $groups A collection of group structures.
@return self
Set the secondary menu s groups .