controllers/AuthItemController.php
protected function getItemChildOptions($itemName)
    {
        $options = array();

        /* @var $am CAuthManager|AuthBehavior */
        $am = Yii::app()->getAuthManager();

        $item = $am->getAuthItem($itemName);
        if ($item instanceof CAuthItem) {
            $exclude = $am->getAncestors($itemName);
            $exclude[$itemName] = $item;
            $exclude = array_merge($exclude, $item->getChildren());
            $authItems = $am->getAuthItems();
            $validChildTypes = $this->getValidChildTypes();

            foreach ($authItems as $childName => $childItem) {
                if (in_array($childItem->type, $validChildTypes) && !isset($exclude[$childName])) {
                    $options[$this->capitalize(
                        $this->getItemTypeText($childItem->type, true)
                    )][$childName] = $childItem->description;
                }
            }
        }

        return $options;
    }
protected function getItemChildOptions($itemName)
    {
        $options = array();

        /* @var $am CAuthManager|AuthBehavior */
        $am = Yii::app()->getAuthManager();

        $item = $am->getAuthItem($itemName);
        if ($item instanceof CAuthItem) {
            $exclude = $am->getAncestors($itemName);
            $exclude[$itemName] = $item;
            $exclude = array_merge($exclude, $item->getChildren());
            $authItems = $am->getAuthItems();
            $validChildTypes = $this->getValidChildTypes();

            foreach ($authItems as $childName => $childItem) {
                if (in_array($childItem->type, $validChildTypes) && !isset($exclude[$childName])) {
                    $options[$this->capitalize(
                        $this->getItemTypeText($childItem->type, true)
                    )][$childName] = $childItem->description;
                }
            }
        }

        return $options;
    }
protected function getItemChildOptions ( $ itemName ) { $ options = array ( ) ; /* @var $am CAuthManager|AuthBehavior */ $ am = Yii :: app ( ) -> getAuthManager ( ) ; $ item = $ am -> getAuthItem ( $ itemName ) ; if ( $ item instanceof CAuthItem ) { $ exclude = $ am -> getAncestors ( $ itemName ) ; $ exclude [ $ itemName ] = $ item ; $ exclude = array_merge ( $ exclude , $ item -> getChildren ( ) ) ; $ authItems = $ am -> getAuthItems ( ) ; $ validChildTypes = $ this -> getValidChildTypes ( ) ; foreach ( $ authItems as $ childName => $ childItem ) { if ( in_array ( $ childItem -> type , $ validChildTypes ) && ! isset ( $ exclude [ $ childName ] ) ) { $ options [ $ this -> capitalize ( $ this -> getItemTypeText ( $ childItem -> type , true ) ) ] [ $ childName ] = $ childItem -> description ; } } } return $ options ; }
Returns a list of possible children for the item with the given name.
@param string $itemName name of the item.
@return array the child options.
Returns a list of possible children for the item with the given name .