Last active
June 3, 2016 09:44
-
-
Save djevans/b852084475d5d767d25872d1abb92f63 to your computer and use it in GitHub Desktop.
Rendering Link elements in Drupal 8.
This file contains 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 | |
$link_element = [ | |
'#type' => 'link', | |
'#title' => [ | |
'#prefix' => '<i class="fa fa-home">', | |
'#markup' => $this->t('Home'), | |
'#suffix' => '</i>', | |
], | |
'#url' => $url, | |
]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment