namespace Drupal\menu_test;
-use Drupal\Component\Utility\SafeMarkup;
+use Drupal\Component\Render\FormattableMarkup;
/**
* Controllers for testing the menu integration routing system.
$_SESSION['menu_test'] = 0;
}
$_SESSION['menu_test']++;
- return ['#markup' => SafeMarkup::format('Session menu_test is @count', ['@count' => $_SESSION['menu_test']])];
+ return ['#markup' => new FormattableMarkup('Session menu_test is @count', ['@count' => $_SESSION['menu_test']])];
}
/**
*/
public function testDefaults($placeholder = NULL) {
if ($placeholder) {
- return ['#markup' => SafeMarkup::format("Sometimes there is a placeholder: '@placeholder'.", ['@placeholder' => $placeholder])];
+ return ['#markup' => new FormattableMarkup("Sometimes there is a placeholder: '@placeholder'.", ['@placeholder' => $placeholder])];
}
else {
return ['#markup' => 'Sometimes there is no placeholder.'];
'#contextual_links' => [
'menu_test_menu' => [
'route_parameters' => ['bar' => 1],
- ]
- ]
- ]
+ ],
+ ],
+ ],
];
}