Permission/PermissionManager.php
private function validateRolePermissions(RoleSecurityIdentity $sid, array $permissions, $subject = null, $class = null, $field = null)
    {
        $configOperations = $this->getConfigPermissionOperations($class, $field);

        foreach ($configOperations as $configOperation) {
            if (!isset($permissions[$configOperation])) {
                if (null !== $sp = $this->getConfigPermission($sid, $configOperation, $subject, $class, $field)) {
                    $permissions[$sp->getPermission()->getOperation()] = $sp;

                    continue;
                }

                throw new PermissionNotFoundException($configOperation, $class, $field);
            }
        }

        return array_values($permissions);
    }
private function validateRolePermissions(RoleSecurityIdentity $sid, array $permissions, $subject = null, $class = null, $field = null)
    {
        $configOperations = $this->getConfigPermissionOperations($class, $field);

        foreach ($configOperations as $configOperation) {
            if (!isset($permissions[$configOperation])) {
                if (null !== $sp = $this->getConfigPermission($sid, $configOperation, $subject, $class, $field)) {
                    $permissions[$sp->getPermission()->getOperation()] = $sp;

                    continue;
                }

                throw new PermissionNotFoundException($configOperation, $class, $field);
            }
        }

        return array_values($permissions);
    }
private function validateRolePermissions ( RoleSecurityIdentity $ sid , array $ permissions , $ subject = null , $ class = null , $ field = null ) { $ configOperations = $ this -> getConfigPermissionOperations ( $ class , $ field ) ; foreach ( $ configOperations as $ configOperation ) { if ( ! isset ( $ permissions [ $ configOperation ] ) ) { if ( null !== $ sp = $ this -> getConfigPermission ( $ sid , $ configOperation , $ subject , $ class , $ field ) ) { $ permissions [ $ sp -> getPermission ( ) -> getOperation ( ) ] = $ sp ; continue ; } throw new PermissionNotFoundException ( $ configOperation , $ class , $ field ) ; } } return array_values ( $ permissions ) ; }
Validate the role permissions.

@param RoleSecurityIdentity                                  $sid         The role security identity
@param PermissionChecking[]                                  $permissions The permission checking
@param null|FieldVote|object|string|SubjectIdentityInterface $subject     The object or class name or field vote
@param null|string                                           $class       The class name
@param null|string                                           $field       The field name

@return PermissionChecking[]
Validate the role permissions .