| 1 | <?php |
||
| 11 | final class BeforeCreateSectionEvent extends BeforeEvent |
||
| 12 | { |
||
| 13 | public const NAME = 'ezplatform.event.section.create.before'; |
||
| 14 | |||
| 15 | /** |
||
| 16 | * @var \eZ\Publish\API\Repository\Values\Content\SectionCreateStruct |
||
| 17 | */ |
||
| 18 | private $sectionCreateStruct; |
||
| 19 | |||
| 20 | /** |
||
| 21 | * @var \eZ\Publish\API\Repository\Values\Content\Section|null |
||
| 22 | */ |
||
| 23 | private $section; |
||
| 24 | |||
| 25 | |||
| 26 | public function __construct(SectionCreateStruct $sectionCreateStruct) |
||
| 30 | |||
| 31 | |||
| 32 | public function getSectionCreateStruct(): SectionCreateStruct |
||
| 36 | |||
| 37 | |||
| 38 | function getSection(): ?Section |
||
| 42 | |||
| 43 | |||
| 44 | function setSection(?Section $section): void |
||
| 48 | |||
| 49 | |||
| 50 | function hasSection(): 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.