public function formatPrivileges(array $privileges)
    {
        if (count($privileges)) {
            $output     = \MUtil_Html_ListElement::ul();
            $privileges = array_combine($privileges, $privileges);

            $output->class = 'allowed';

            foreach ($this->getUsedPrivileges() as $privilege => $description) {
                if (isset($privileges[$privilege])) {
                    $output->li()->raw($description);
                }
            }
            if (count($output)) {
                return $output;
            }
        }

        return \MUtil_Html::create('em', $this->_('No privileges found.'));
    }
public function formatPrivileges(array $privileges)
    {
        if (count($privileges)) {
            $output     = \MUtil_Html_ListElement::ul();
            $privileges = array_combine($privileges, $privileges);

            $output->class = 'allowed';

            foreach ($this->getUsedPrivileges() as $privilege => $description) {
                if (isset($privileges[$privilege])) {
                    $output->li()->raw($description);
                }
            }
            if (count($output)) {
                return $output;
            }
        }

        return \MUtil_Html::create('em', $this->_('No privileges found.'));
    }
public function formatPrivileges ( array $ privileges ) { if ( count ( $ privileges ) ) { $ output = \ MUtil_Html_ListElement :: ul ( ) ; $ privileges = array_combine ( $ privileges , $ privileges ) ; $ output -> class = 'allowed' ; foreach ( $ this -> getUsedPrivileges ( ) as $ privilege => $ description ) { if ( isset ( $ privileges [ $ privilege ] ) ) { $ output -> li ( ) -> raw ( $ description ) ; } } if ( count ( $ output ) ) { return $ output ; } } return \ MUtil_Html :: create ( 'em' , $ this -> _ ( 'No privileges found.' ) ) ; }
Output for viewing rols

@param array $privileges
@return \MUtil_Html_ListElement
Output for viewing rols