/**
 * Implements hook_link_alter().
 */
function {{ machine_name }}_link_alter(&$variables) {
  // Add a warning to the end of route links to the admin section.
  /** @var \Drupal\Core\Url $url */
  $url = $variables['url'];
  if ($url->isRouted() && strpos($url->getRouteName(), 'admin') !== FALSE) {
    $variables['text'] = t('@text (Warning!)', ['@text' => $variables['text']]);
  }
}
