Class

eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Security\PolicyProvider\YamlPolicyProvider

abstract class YamlPolicyProvider implements PolicyProviderInterface

YAML based policy provider.

Methods

array addPolicies(ConfigBuilderInterface $configBuilder)

Adds policies configuration hash to $configBuilder.

Details

at line 19
public array 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:

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

Equivalent in YAML:

```yaml content: read: [Class, ParentClass, Node, Language] edit: [Class, ParentClass, Language] # ...

custommodule: customfunction1: ~ customfunction_2: [CustomLimitation] ```

Parameters

ConfigBuilderInterface $configBuilder

Return Value

array