Skip to content

Feature request: new method Link::isLinkCurrent() #229

@MartkCz

Description

@MartkCz

I want check lazy link if is current, but I can't because of private $component

class TabsComponent {

    public function addLink(string $name, Link $link)

}

Solution is:

class Link {

    public function getComponent(): Component

}

or better

class Link {

    public function isLinkCurrent(): bool {
        return $this->component->isLinkCurrent($this->destination, $this->parameters);
    }

}

I'm willing to write a PR

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions