yii\rbac\DbManager::getChildrenRecursive PHP Method

getChildrenRecursive() protected method

Recursively finds all children and grand children of the specified item.
protected getChildrenRecursive ( string $name, array $childrenList, array &$result )
$name string the name of the item whose children are to be looked for.
$childrenList array the child list built via [[getChildrenList()]]
$result array the children and grand children (in array keys)
    protected function getChildrenRecursive($name, $childrenList, &$result)
    {
        if (isset($childrenList[$name])) {
            foreach ($childrenList[$name] as $child) {
                $result[$child] = true;
                $this->getChildrenRecursive($child, $childrenList, $result);
            }
        }
    }