Airship\Cabin\Bridge\Blueprint\Permissions::flattenMultiContextTree PHP Method

flattenMultiContextTree() protected method

protected flattenMultiContextTree ( array $return, array $contexts, array $actions = [] ) : array
$return array
$contexts array
$actions array
return array
    protected function flattenMultiContextTree(array $return, array $contexts, array $actions = []) : array
    {
        $tree = [];
        foreach ($contexts as $c) {
            if (empty($tree)) {
                $tree = $return[$c];
                continue;
            }
            $tree = $this->flattenContextTree($tree, $return[$c], $actions);
        }
        return $tree;
    }