| 1 | <?php |
||
| 11 | final class BeforeUpdateSectionEvent extends BeforeEvent |
||
| 12 | { |
||
| 13 | public const NAME = 'ezplatform.event.section.update.before'; |
||
| 14 | |||
| 15 | /** |
||
| 16 | * @var \eZ\Publish\API\Repository\Values\Content\Section |
||
| 17 | */ |
||
| 18 | private $section; |
||
| 19 | |||
| 20 | /** |
||
| 21 | * @var \eZ\Publish\API\Repository\Values\Content\SectionUpdateStruct |
||
| 22 | */ |
||
| 23 | private $sectionUpdateStruct; |
||
| 24 | |||
| 25 | /** |
||
| 26 | * @var \eZ\Publish\API\Repository\Values\Content\Section|null |
||
| 27 | */ |
||
| 28 | private $updatedSection; |
||
| 29 | |||
| 30 | |||
| 31 | public function __construct(Section $section, SectionUpdateStruct $sectionUpdateStruct) |
||
| 36 | |||
| 37 | |||
| 38 | public function getSection(): Section |
||
| 42 | |||
| 43 | |||
| 44 | public function getSectionUpdateStruct(): SectionUpdateStruct |
||
| 48 | |||
| 49 | |||
| 50 | function getUpdatedSection(): ?Section |
||
| 54 | |||
| 55 | |||
| 56 | function setUpdatedSection(?Section $updatedSection): void |
||
| 60 | |||
| 61 | |||
| 62 | function hasUpdatedSection(): 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.