Exponential 5.x Kernel 7.5.40 Exponential New Stack (Symfony-based) Kernel — PHP Class Reference

Public Member Functions | Protected Member Functions | List of all members
eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Security\PolicyProvider\YamlPolicyProvider Class Reference

YAML based policy provider. More...

Inheritance diagram for eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Security\PolicyProvider\YamlPolicyProvider:

## Public Member Functions
| addPolicies (ConfigBuilderInterface $configBuilder)
| Adds policies configuration hash to $configBuilder. More...

## Protected Member Functions
| getFiles ()
| Returns an array of files where the policy configuration lies. More...

## Detailed Description

YAML based policy provider.

Definition at line 16 of file YamlPolicyProvider.php.

## Member Function Documentation

## ◆ addPolicies()

eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Security\PolicyProvider\YamlPolicyProvider::addPolicies | ( | ConfigBuilderInterface | $configBuilder | ) |

Adds policies configuration hash to $configBuilder.

Policies configuration hash contains declared modules, functions and limitations. First level key is the module name, value is a hash of available functions, with function name as key. Function value is an array of available limitations, identified by the alias declared in LimitationType service tag. If no limitation is provided, value can be null.

Example:

[
"content" => [
"read" => ["Class", "ParentClass", "Node", "Language"],
"edit" => ["Class", "ParentClass", "Language"]
],
"custom_module" => [
"custom_function_1" => null,
"custom_function_2" => ["CustomLimitation"]
],
]

Equivalent in YAML:

content:
read: [Class, ParentClass, Node, Language]
edit: [Class, ParentClass, Language]
# ...
custom_module:
custom_function_1: ~
custom_function_2: [CustomLimitation]

Implements eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Security\PolicyProvider\PolicyProviderInterface.

Definition at line 18 of file YamlPolicyProvider.php.

References eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Configuration\ConfigBuilderInterface\addConfig(), eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Configuration\ConfigBuilderInterface\addResource(), and eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Security\PolicyProvider\YamlPolicyProvider\getFiles().

## ◆ getFiles()

eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Security\PolicyProvider\YamlPolicyProvider::getFiles | ( |  | ) |
| abstract protected

Returns an array of files where the policy configuration lies.

Each file path MUST be absolute.

Example:

return [__DIR__ . '/../Resources/config/policies.yml'];

Returns
  array

Reimplemented in eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Security\PolicyProvider\RepositoryPolicyProvider.

Referenced by eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Security\PolicyProvider\YamlPolicyProvider\addPolicies().

The documentation for this class was generated from the following file:

- YamlPolicyProvider.php

Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.