| 1 | <?php |
||
| 12 | final class BeforeUpdateContentEvent extends BeforeEvent |
||
| 13 | { |
||
| 14 | public const NAME = 'ezplatform.event.content.update.before'; |
||
| 15 | |||
| 16 | /** |
||
| 17 | * @var \eZ\Publish\API\Repository\Values\Content\VersionInfo |
||
| 18 | */ |
||
| 19 | private $versionInfo; |
||
| 20 | |||
| 21 | /** |
||
| 22 | * @var \eZ\Publish\API\Repository\Values\Content\ContentUpdateStruct |
||
| 23 | */ |
||
| 24 | private $contentUpdateStruct; |
||
| 25 | |||
| 26 | /** |
||
| 27 | * @var \eZ\Publish\API\Repository\Values\Content\Content|null |
||
| 28 | */ |
||
| 29 | private $content; |
||
| 30 | |||
| 31 | |||
| 32 | public function __construct(VersionInfo $versionInfo, ContentUpdateStruct $contentUpdateStruct) |
||
| 37 | |||
| 38 | |||
| 39 | public function getVersionInfo(): VersionInfo |
||
| 43 | |||
| 44 | |||
| 45 | public function getContentUpdateStruct(): ContentUpdateStruct |
||
| 49 | |||
| 50 | |||
| 51 | function getContent(): ?Content |
||
| 55 | |||
| 56 | |||
| 57 | function setContent(?Content $content): void |
||
| 61 | |||
| 62 | |||
| 63 | function hasContent(): bool |
||
| 67 | } |
||
| 68 |
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.