| 1 | <?php |
||
| 11 | final class BeforePublishVersionEvent extends BeforeEvent |
||
| 12 | { |
||
| 13 | public const NAME = 'ezplatform.event.version.publish.before'; |
||
| 14 | |||
| 15 | /** |
||
| 16 | * @var \eZ\Publish\API\Repository\Values\Content\VersionInfo |
||
| 17 | */ |
||
| 18 | private $versionInfo; |
||
| 19 | |||
| 20 | /** |
||
| 21 | * @var \eZ\Publish\API\Repository\Values\Content\Content|null |
||
| 22 | */ |
||
| 23 | private $content; |
||
| 24 | |||
| 25 | |||
| 26 | public function __construct(VersionInfo $versionInfo) |
||
| 30 | |||
| 31 | |||
| 32 | public function getVersionInfo(): VersionInfo |
||
| 36 | |||
| 37 | |||
| 38 | function getContent(): ?Content |
||
| 42 | |||
| 43 | |||
| 44 | function setContent(?Content $content): void |
||
| 48 | |||
| 49 | |||
| 50 | function hasContent(): 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.