As a developer, I would like a generic method I can use to inject an accessible link into a page being generated, so that developers do not need to hardcode links and portions of the link which can be generated automatically are generated automatically.
Currently, links can be rendered with View::renderLink($href, $text, $external = false):
|
public function renderLink($href, $text, $external = false) |
|
{ |
|
return "<a href=\"$href\" " . |
|
($external ? "target=\"_blank\" rel=\"noopener\"" : '') . |
|
">$text</a>"; |
|
} |
If $external is true, then View::renderLink() should clearly communicate that the link is external, and if it forces a popup, it should clearly communicate that too, for example with an icon similar to
.
This feature probably depends on #72.
Implementing this feature would be useful for #39.