drupal 8 html in type link

Solutions on MaxInterview for drupal 8 html in type link by the best coders in the world

showing results for - "drupal 8 html in type link"
Philipp
30 Oct 2019
1use Drupal\Core\Url;
2
3$rendable_link = [
4  '#type' => 'link',
5  '#title' => $this->t('Link title'),
6  '#url' => Url::fromRoute('YOUR_ROUTE'),
7];
Greta
01 Oct 2018
1$link = [
2  '#type' => 'link',
3  '#title' => [
4      '#type' => 'inline_template',
5      '#template' => '{{ title }} <span class="icon-right-arrow"></span>',
6      '#context' => [
7        'title' => $title
8      ],
9  ],
10  '#url' => Url::fromRoute('user.pass'),
11];