| 1 | <?php |
||
| 10 | final class BeforeCopySubtreeEvent extends BeforeEvent |
||
| 11 | { |
||
| 12 | public const NAME = 'ezplatform.event.location.copy_subtree.before'; |
||
| 13 | |||
| 14 | /** |
||
| 15 | * @var \eZ\Publish\API\Repository\Values\Content\Location |
||
| 16 | */ |
||
| 17 | private $subtree; |
||
| 18 | |||
| 19 | /** |
||
| 20 | * @var \eZ\Publish\API\Repository\Values\Content\Location |
||
| 21 | */ |
||
| 22 | private $targetParentLocation; |
||
| 23 | |||
| 24 | /** |
||
| 25 | * @var \eZ\Publish\API\Repository\Values\Content\Location|null |
||
| 26 | */ |
||
| 27 | private $location; |
||
| 28 | |||
| 29 | |||
| 30 | public function __construct(Location $subtree, Location $targetParentLocation) |
||
| 35 | |||
| 36 | |||
| 37 | public function getSubtree(): Location |
||
| 41 | |||
| 42 | |||
| 43 | public function getTargetParentLocation(): Location |
||
| 47 | |||
| 48 | |||
| 49 | function getLocation(): ?Location |
||
| 53 | |||
| 54 | |||
| 55 | function setLocation(?Location $location): void |
||
| 59 | |||
| 60 | |||
| 61 | function hasLocation(): bool |
||
| 65 | } |
||
| 66 |
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.