Created
October 27, 2016 19:15
-
-
Save guiajlopes/c926ff9f0468207dc1e755dde750227f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| $path = $this->pathValidator->getUrlIfValid('<front>'); | |
| $route_name = $path->getRouteName(); | |
| $url = Url::fromRoute($route_name); | |
| $url->setOptions([ | |
| 'attributes' => [ | |
| 'class' => ['name-wrapper'], | |
| ], | |
| ]); | |
| $title = SafeMarkup::format('<span class="category-name">@text</span>', ['@text' => t('Exemplo')]); | |
| $link = Link::fromTextAndUrl($title, $url)->toString(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment