protected function validateRoleCreateStruct(APIRoleCreateStruct $roleCreateStruct)
    {
        $allErrors = array();
        foreach ($roleCreateStruct->getPolicies() as $key => $policyCreateStruct) {
            $errors = $this->validatePolicy(
                $policyCreateStruct->module,
                $policyCreateStruct->function,
                $policyCreateStruct->getLimitations()
            );

            if (!empty($errors)) {
                $allErrors[$key] = $errors;
            }
        }

        return $allErrors;
    }
protected function validateRoleCreateStruct(APIRoleCreateStruct $roleCreateStruct)
    {
        $allErrors = array();
        foreach ($roleCreateStruct->getPolicies() as $key => $policyCreateStruct) {
            $errors = $this->validatePolicy(
                $policyCreateStruct->module,
                $policyCreateStruct->function,
                $policyCreateStruct->getLimitations()
            );

            if (!empty($errors)) {
                $allErrors[$key] = $errors;
            }
        }

        return $allErrors;
    }
protected function validateRoleCreateStruct ( APIRoleCreateStruct $ roleCreateStruct ) { $ allErrors = array ( ) ; foreach ( $ roleCreateStruct -> getPolicies ( ) as $ key => $ policyCreateStruct ) { $ errors = $ this -> validatePolicy ( $ policyCreateStruct -> module , $ policyCreateStruct -> function , $ policyCreateStruct -> getLimitations ( ) ) ; if ( ! empty ( $ errors ) ) { $ allErrors [ $ key ] = $ errors ; } } return $ allErrors ; }
Validates Policies and Limitations in Role create struct.

@uses ::validatePolicy()

@param \eZ\Publish\API\Repository\Values\User\RoleCreateStruct $roleCreateStruct

@return \eZ\Publish\Core\FieldType\ValidationError[][][]
Validates Policies and Limitations in Role create struct .