diff --git a/src/Application/UI/Link.php b/src/Application/UI/Link.php index 751dc999f..b06937bb5 100644 --- a/src/Application/UI/Link.php +++ b/src/Application/UI/Link.php @@ -41,6 +41,15 @@ public function __construct(Component $component, string $destination, array $pa } + /** + * Returns link component. + */ + public function getComponent(): Component + { + return $this->component; + } + + /** * Returns link destination. */ @@ -80,6 +89,15 @@ public function getParameters(): array } + /** + * Determines whether this links to the current page. + */ + public function isLinkCurrent(): bool + { + return $this->component->isLinkCurrent($this->destination, $this->parameters); + } + + /** * Converts link to URL. */