| 1 | <?php |
||
| 11 | final class BeforeTrashEvent extends BeforeEvent |
||
| 12 | { |
||
| 13 | public const NAME = 'ezplatform.event.trash.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\TrashItem|null |
||
| 22 | */ |
||
| 23 | private $result; |
||
| 24 | |||
| 25 | /** |
||
| 26 | * @var bool |
||
| 27 | */ |
||
| 28 | private $resultSet = false; |
||
| 29 | |||
| 30 | |||
| 31 | public function __construct(Location $location) |
||
| 35 | |||
| 36 | |||
| 37 | public function getLocation(): Location |
||
| 41 | |||
| 42 | |||
| 43 | function getResult(): ?TrashItem |
||
| 47 | |||
| 48 | |||
| 49 | function setResult(?TrashItem $result): void |
||
| 54 | |||
| 55 | function hasTrashItem(): bool |
||
| 59 | |||
| 60 | function resetResult(): void |
||
| 65 | |||
| 66 | function isResultSet(): bool |
||
| 70 | } |
||
| 71 |
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.