Mercurial > hg > cmmr2012-drupal-site
comparison core/modules/shortcut/shortcut.module @ 4:a9cd425dd02b
Update, including to Drupal core 8.6.10
author | Chris Cannam |
---|---|
date | Thu, 28 Feb 2019 13:11:55 +0000 |
parents | c75dbcec494b |
children | 12f9dff5fda9 |
comparison
equal
deleted
inserted
replaced
3:307d7a7fd348 | 4:a9cd425dd02b |
---|---|
3 /** | 3 /** |
4 * @file | 4 * @file |
5 * Allows users to manage customizable lists of shortcut links. | 5 * Allows users to manage customizable lists of shortcut links. |
6 */ | 6 */ |
7 | 7 |
8 use Drupal\Component\Utility\SafeMarkup; | 8 use Drupal\Component\Render\FormattableMarkup; |
9 use Drupal\Core\Access\AccessResult; | 9 use Drupal\Core\Access\AccessResult; |
10 use Drupal\Core\Cache\Cache; | 10 use Drupal\Core\Cache\Cache; |
11 use Drupal\Core\Routing\RouteMatchInterface; | 11 use Drupal\Core\Routing\RouteMatchInterface; |
12 use Drupal\Core\Url; | 12 use Drupal\Core\Url; |
13 use Drupal\shortcut\Entity\ShortcutSet; | 13 use Drupal\shortcut\Entity\ShortcutSet; |
354 'library' => [ | 354 'library' => [ |
355 'shortcut/drupal.shortcut', | 355 'shortcut/drupal.shortcut', |
356 ], | 356 ], |
357 ], | 357 ], |
358 '#type' => 'link', | 358 '#type' => 'link', |
359 '#title' => SafeMarkup::format('<span class="shortcut-action__icon"></span><span class="shortcut-action__message">@text</span>', ['@text' => $link_text]), | 359 '#title' => new FormattableMarkup('<span class="shortcut-action__icon"></span><span class="shortcut-action__message">@text</span>', ['@text' => $link_text]), |
360 '#url' => Url::fromRoute($route_name, $route_parameters), | 360 '#url' => Url::fromRoute($route_name, $route_parameters), |
361 '#options' => ['query' => $query], | 361 '#options' => ['query' => $query], |
362 '#attributes' => [ | 362 '#attributes' => [ |
363 'class' => [ | 363 'class' => [ |
364 'shortcut-action', | 364 'shortcut-action', |