| 1 | <?php |
||
| 11 | final class BeforeCreateRoleDraftEvent extends BeforeEvent |
||
| 12 | { |
||
| 13 | public const NAME = 'ezplatform.event.role.draft_create.before'; |
||
| 14 | |||
| 15 | /** |
||
| 16 | * @var \eZ\Publish\API\Repository\Values\User\Role |
||
| 17 | */ |
||
| 18 | private $role; |
||
| 19 | |||
| 20 | /** |
||
| 21 | * @var \eZ\Publish\API\Repository\Values\User\RoleDraft|null |
||
| 22 | */ |
||
| 23 | private $roleDraft; |
||
| 24 | |||
| 25 | |||
| 26 | public function __construct(Role $role) |
||
| 30 | |||
| 31 | |||
| 32 | public function getRole(): Role |
||
| 36 | |||
| 37 | |||
| 38 | function getRoleDraft(): ?RoleDraft |
||
| 42 | |||
| 43 | |||
| 44 | function setRoleDraft(?RoleDraft $roleDraft): void |
||
| 48 | |||
| 49 | |||
| 50 | function hasRoleDraft(): bool |
||
| 54 | } |
||
| 55 |
Adding explicit visibility (
private,protected, orpublic) is generally recommend to communicate to other developers how, and from where this method is intended to be used.