| 1 | <?php | ||
| 10 | final class BeforeCreateGlobalUrlAliasEvent extends BeforeEvent | ||
| 11 | { | ||
| 12 | public const NAME = 'ezplatform.event.url_alias.create_global.before'; | ||
| 13 | |||
| 14 | private $resource; | ||
| 15 | |||
| 16 | private $path; | ||
| 17 | |||
| 18 | private $languageCode; | ||
| 19 | |||
| 20 | private $forwarding; | ||
| 21 | |||
| 22 | private $alwaysAvailable; | ||
| 23 | |||
| 24 | /** | ||
| 25 | * @var \eZ\Publish\API\Repository\Values\Content\URLAlias|null | ||
| 26 | */ | ||
| 27 | private $urlAlias; | ||
| 28 | |||
| 29 | |||
| 30 | public function __construct($resource, $path, $languageCode, $forwarding, $alwaysAvailable) | ||
| 31 | 	{ | ||
| 32 | $this->resource = $resource; | ||
| 33 | $this->path = $path; | ||
| 34 | $this->languageCode = $languageCode; | ||
| 35 | $this->forwarding = $forwarding; | ||
| 36 | $this->alwaysAvailable = $alwaysAvailable; | ||
| 37 | } | ||
| 38 | |||
| 39 | |||
| 40 | public function getResource() | ||
| 41 | 	{ | ||
| 42 | return $this->resource; | ||
| 43 | } | ||
| 44 | |||
| 45 | |||
| 46 | public function getPath() | ||
| 50 | |||
| 51 | |||
| 52 | public function getLanguageCode() | ||
| 56 | |||
| 57 | |||
| 58 | public function getForwarding() | ||
| 62 | |||
| 63 | |||
| 64 | public function getAlwaysAvailable() | ||
| 68 | |||
| 69 | |||
| 70 | function getUrlAlias(): ?URLAlias | ||
| 74 | |||
| 75 | |||
| 76 | function setUrlAlias(?URLAlias $urlAlias): void | ||
| 80 | |||
| 81 | |||
| 82 | function hasUrlAlias(): bool | ||
| 86 | } | ||
| 87 | 
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.