| 1 | <?php |
||
| 11 | final class BeforeCreateNotificationEvent extends BeforeEvent |
||
| 12 | { |
||
| 13 | public const NAME = 'ezplatform.event.notification.create.before'; |
||
| 14 | |||
| 15 | /** |
||
| 16 | * @var \eZ\Publish\API\Repository\Values\Notification\CreateStruct |
||
| 17 | */ |
||
| 18 | private $createStruct; |
||
| 19 | |||
| 20 | /** |
||
| 21 | * @var \eZ\Publish\API\Repository\Values\Notification\Notification|null |
||
| 22 | */ |
||
| 23 | private $notification; |
||
| 24 | |||
| 25 | |||
| 26 | public function __construct(CreateStruct $createStruct) |
||
| 30 | |||
| 31 | |||
| 32 | public function getCreateStruct(): CreateStruct |
||
| 36 | |||
| 37 | |||
| 38 | function getNotification(): ?Notification |
||
| 42 | |||
| 43 | |||
| 44 | function setNotification(?Notification $notification): void |
||
| 48 | |||
| 49 | |||
| 50 | function hasNotification(): 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.