Skip to content
Permalink
Browse files

Link: added isLinkCurrent() & getComponent() [Closes #229]

  • Loading branch information
dg committed Jan 3, 2020
1 parent 0a40ae6 commit dad3fd0b8ffb27068da6a148c1d06581a3e2148b
Showing with 18 additions and 0 deletions.
  1. +18 −0 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->params);
}


/**
* Converts link to URL.
*/

0 comments on commit dad3fd0

Please sign in to comment.
You can’t perform that action at this time.