protected function _addUsedPrivileges(array &$privileges, $label)
    {
        foreach ($this->_subItems as $item) {
            // Skip autofilter action, but include all others
            if ($item->get('action') == 'autofilter') {
                continue;
            }
            $_itemlabel = $label . ($item->get('label') ?: $item->get('privilege'));
            if ($_privilege = $item->get('privilege')) {

                if (isset($privileges[$_privilege])) {
                    $privileges[$_privilege] .= "<br/>&nbsp; + " . $_itemlabel;
                } else {
                    $privileges[$_privilege] = $_itemlabel;
                }
            }
            $item->_addUsedPrivileges($privileges, $_itemlabel . '-&gt;');
        }
    }
protected function _addUsedPrivileges(array &$privileges, $label)
    {
        foreach ($this->_subItems as $item) {
            // Skip autofilter action, but include all others
            if ($item->get('action') == 'autofilter') {
                continue;
            }
            $_itemlabel = $label . ($item->get('label') ?: $item->get('privilege'));
            if ($_privilege = $item->get('privilege')) {

                if (isset($privileges[$_privilege])) {
                    $privileges[$_privilege] .= "<br/>&nbsp; + " . $_itemlabel;
                } else {
                    $privileges[$_privilege] = $_itemlabel;
                }
            }
            $item->_addUsedPrivileges($privileges, $_itemlabel . '-&gt;');
        }
    }
protected function _addUsedPrivileges ( array & $ privileges , $ label ) { foreach ( $ this -> _subItems as $ item ) { // Skip autofilter action, but include all others if ( $ item -> get ( 'action' ) == 'autofilter' ) { continue ; } $ _itemlabel = $ label . ( $ item -> get ( 'label' ) ? : $ item -> get ( 'privilege' ) ) ; if ( $ _privilege = $ item -> get ( 'privilege' ) ) { if ( isset ( $ privileges [ $ _privilege ] ) ) { $ privileges [ $ _privilege ] .= "<br/>&nbsp; + " . $ _itemlabel ; } else { $ privileges [ $ _privilege ] = $ _itemlabel ; } } $ item -> _addUsedPrivileges ( $ privileges , $ _itemlabel . '-&gt;' ) ; } }
Adds privileges that are used in this menu item to the array

@param array $privileges
Adds privileges that are used in this menu item to the array