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

Core/REST/Client/Values/User/PolicyCreateStruct.php
Go to the documentation of this file.
1 <?php
2
7 namespace eZ\Publish\Core\REST\Client\Values\User;
8
9 use eZ\Publish\API\Repository\Values\User\Limitation;
10 use eZ\Publish\API\Repository\Values\User\PolicyCreateStruct as APIPolicyCreateStruct;
11
18 class PolicyCreateStruct extends APIPolicyCreateStruct
19 {
25 protected $limitations = array();
26
33 public function __construct($module, $function)
34 {
35 parent::__construct(
36 array(
37 'module' => $module,
38 'function' => $function,
39 )
40 );
41 }
42
48 public function getLimitations()
49 {
50 return $this->limitations;
51 }
52
58 public function addLimitation(Limitation $limitation)
59 {
60 $limitationIdentifier = $limitation->getIdentifier();
61 $this->limitations[$limitationIdentifier] = $limitation;
62 }
63 }
eZ\Publish\API\Repository\Values\User\Limitation
This class represents a Limitation applied to a policy.
Definition: API/Repository/Values/User/Limitation.php:15
eZ\Publish\API\Repository\Values\User\Limitation\getIdentifier
getIdentifier()
Returns the limitation identifier (one of the defined constants) or a custom limitation.
eZ\Publish\API\Repository\Values\User\PolicyCreateStruct
This class is used to create a policy.
Definition: API/Repository/Values/User/PolicyCreateStruct.php:13
eZ\Publish\API\Repository\Values\User\PolicyCreateStruct\$module
$module
Definition: API/Repository/Values/User/PolicyCreateStruct.php:21
eZ\Publish\API\Repository\Values\User\PolicyCreateStruct\$function
$function
Definition: API/Repository/Values/User/PolicyCreateStruct.php:30
eZ\Publish\Core\REST\Client\Values\User\PolicyCreateStruct
Implementation of the \eZ\Publish\API\Repository\Values\User\PolicyCreateStruct class.
Definition: Core/REST/Client/Values/User/PolicyCreateStruct.php:19
eZ\Publish\Core\REST\Client\Values\User\PolicyCreateStruct\getLimitations
getLimitations()
Returns list of limitations added to policy.
Definition: Core/REST/Client/Values/User/PolicyCreateStruct.php:48
eZ\Publish\Core\REST\Client\Values\User\PolicyCreateStruct\addLimitation
addLimitation(Limitation $limitation)
Adds a limitation with the given identifier and list of values.
Definition: Core/REST/Client/Values/User/PolicyCreateStruct.php:58
eZ\Publish\Core\REST\Client\Values\User\PolicyCreateStruct\$limitations
$limitations
Definition: Core/REST/Client/Values/User/PolicyCreateStruct.php:25
eZ\Publish\Core\REST\Client\Values\User\PolicyCreateStruct\__construct
__construct($module, $function)
Instantiates a policy create struct.
Definition: Core/REST/Client/Values/User/PolicyCreateStruct.php:33
eZ\Publish\API\Repository\Values\User\Limitation
Definition: BlockingLimitation.php:7
eZ\Publish\Core\REST\Client\Values\User
Definition: Core/REST/Client/Values/User/Policy.php:7
Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.