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