| 1 | <?php |
||
| 11 | final class BeforeCreateContentEvent extends BeforeEvent |
||
| 12 | { |
||
| 13 | public const NAME = 'ezplatform.event.content.create.before'; |
||
| 14 | |||
| 15 | /** |
||
| 16 | * @var \eZ\Publish\API\Repository\Values\Content\ContentCreateStruct |
||
| 17 | */ |
||
| 18 | private $contentCreateStruct; |
||
| 19 | |||
| 20 | /** |
||
| 21 | * @var array |
||
| 22 | */ |
||
| 23 | private $locationCreateStructs; |
||
| 24 | |||
| 25 | /** |
||
| 26 | * @var \eZ\Publish\API\Repository\Values\Content\Content|null |
||
| 27 | */ |
||
| 28 | private $content; |
||
| 29 | |||
| 30 | |||
| 31 | public function __construct(ContentCreateStruct $contentCreateStruct, array $locationCreateStructs) |
||
| 36 | |||
| 37 | |||
| 38 | public function getContentCreateStruct(): ContentCreateStruct |
||
| 42 | |||
| 43 | |||
| 44 | public function getLocationCreateStructs(): array |
||
| 48 | |||
| 49 | |||
| 50 | function getContent(): ?Content |
||
| 54 | |||
| 55 | |||
| 56 | function setContent(?Content $content): void |
||
| 60 | |||
| 61 | |||
| 62 | function hasContent(): bool |
||
| 66 | } |
||
| 67 |
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.