| 1 | <?php |
||
| 10 | final class BeforeTranslateEvent extends BeforeEvent |
||
| 11 | { |
||
| 12 | public const NAME = 'ezplatform.event.url_wildcard.translate.before'; |
||
| 13 | |||
| 14 | private $url; |
||
| 15 | |||
| 16 | /** |
||
| 17 | * @var \eZ\Publish\API\Repository\Values\Content\URLWildcardTranslationResult|null |
||
| 18 | */ |
||
| 19 | private $result; |
||
| 20 | |||
| 21 | |||
| 22 | public function __construct($url) |
||
| 26 | |||
| 27 | |||
| 28 | public function getUrl() |
||
| 32 | |||
| 33 | |||
| 34 | function getResult(): ?URLWildcardTranslationResult |
||
| 38 | |||
| 39 | |||
| 40 | function setResult(?URLWildcardTranslationResult $result): void |
||
| 44 | |||
| 45 | |||
| 46 | function hasResult(): bool |
||
| 50 | } |
||
| 51 |
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.