components/AuthBehavior.php
public function getItemsPermissions($names)
    {
        $permissions = array();

        $items = $this->getPermissions();
        $flat = $this->flattenPermissions($items);

        foreach ($flat as $itemName => $item) {
            if (in_array($itemName, $names)) {
                $permissions[$itemName] = $item;
            }
        }

        return $permissions;
    }
public function getItemsPermissions($names)
    {
        $permissions = array();

        $items = $this->getPermissions();
        $flat = $this->flattenPermissions($items);

        foreach ($flat as $itemName => $item) {
            if (in_array($itemName, $names)) {
                $permissions[$itemName] = $item;
            }
        }

        return $permissions;
    }
public function getItemsPermissions ( $ names ) { $ permissions = array ( ) ; $ items = $ this -> getPermissions ( ) ; $ flat = $ this -> flattenPermissions ( $ items ) ; foreach ( $ flat as $ itemName => $ item ) { if ( in_array ( $ itemName , $ names ) ) { $ permissions [ $ itemName ] = $ item ; } } return $ permissions ; }
Returns the permissions for the items with the given names.
@param string[] $names list of item names.
@return array the permissions.
Returns the permissions for the items with the given names .