| 1 | <?php |
||
| 21 | abstract class Role extends ValueObject |
||
| 22 | { |
||
| 23 | /** @var int Status constant for defined (aka "published") role */ |
||
| 24 | const STATUS_DEFINED = 0; |
||
| 25 | |||
| 26 | /** @var int Status constant for draft (aka "temporary") role */ |
||
| 27 | const STATUS_DRAFT = 1; |
||
| 28 | |||
| 29 | /** |
||
| 30 | * ID of the user role. |
||
| 31 | * |
||
| 32 | * @var int |
||
| 33 | */ |
||
| 34 | protected $id; |
||
| 35 | |||
| 36 | /** |
||
| 37 | * Readable string identifier of a role |
||
| 38 | * in 4.x. this is mapped to the role name. |
||
| 39 | * |
||
| 40 | * @var string |
||
| 41 | */ |
||
| 42 | protected $identifier; |
||
| 43 | |||
| 44 | /** |
||
| 45 | * The status of the role. |
||
| 46 | * |
||
| 47 | * @var int One of Role::STATUS_DEFINED|Role::STATUS_DRAFT |
||
| 48 | */ |
||
| 49 | protected $status; |
||
| 50 | |||
| 51 | /** |
||
| 52 | * @return int |
||
| 53 | */ |
||
| 54 | public function getStatus(): int |
||
| 58 | |||
| 59 | /** |
||
| 60 | * Returns the list of policies of this role. |
||
| 61 | * |
||
| 62 | * @return \eZ\Publish\API\Repository\Values\User\Policy[] |
||
| 63 | */ |
||
| 64 | abstract public function getPolicies(): iterable; |
||
| 65 | } |
||
| 66 |