| 1 | <?php |
||
| 11 | final class BeforeUpdateLocationEvent extends BeforeEvent |
||
| 12 | { |
||
| 13 | public const NAME = 'ezplatform.event.location.update.before'; |
||
| 14 | |||
| 15 | /** |
||
| 16 | * @var \eZ\Publish\API\Repository\Values\Content\Location |
||
| 17 | */ |
||
| 18 | private $location; |
||
| 19 | |||
| 20 | /** |
||
| 21 | * @var \eZ\Publish\API\Repository\Values\Content\LocationUpdateStruct |
||
| 22 | */ |
||
| 23 | private $locationUpdateStruct; |
||
| 24 | |||
| 25 | /** |
||
| 26 | * @var \eZ\Publish\API\Repository\Values\Content\Location|null |
||
| 27 | */ |
||
| 28 | private $updatedLocation; |
||
| 29 | |||
| 30 | |||
| 31 | public function __construct(Location $location, LocationUpdateStruct $locationUpdateStruct) |
||
| 36 | |||
| 37 | |||
| 38 | public function getLocation(): Location |
||
| 42 | |||
| 43 | |||
| 44 | public function getLocationUpdateStruct(): LocationUpdateStruct |
||
| 48 | |||
| 49 | |||
| 50 | function getUpdatedLocation(): ?Location |
||
| 54 | |||
| 55 | |||
| 56 | function setUpdatedLocation(?Location $updatedLocation): void |
||
| 60 | |||
| 61 | |||
| 62 | function hasUpdatedLocation(): 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.