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

Public Member Functions | List of all members
eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Security\PolicyProvider\PolicyProviderInterface Interface Reference

Interface for DIC extensions which provide policies to be exposed for permissions in the Repository. More...

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

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

## Detailed Description

Interface for DIC extensions which provide policies to be exposed for permissions in the Repository.

Each policy provider provides a collection of permission "modules". Each module can provide "functions". E.g. "content/read": "content" is the module, "read" is the function.

Each function can provide a collection of limitations. These need to be implemented as "limitation types" and declared as services with "ezpublish.limitationType" service tag. Limitation types also provide value objects based on \eZ\Publish\API\Repository\Values\User\Limitation abstract class.

Since
  6.0

Definition at line 24 of file PolicyProviderInterface.php.

## Member Function Documentation

## ◆ addPolicies()

eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Security\PolicyProvider\PolicyProviderInterface::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]

Implemented in eZ\Bundle\EzPublishCoreBundle\DependencyInjection\Security\PolicyProvider\YamlPolicyProvider.

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

- PolicyProviderInterface.php

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