X-Git-Url: https://yaffs.net/gitweb/?a=blobdiff_plain;f=web%2Fcore%2Fincludes%2Fmenu.inc;h=89d489120ba59c87adc8a494d26422b3795d744c;hb=0bf8d09d2542548982e81a441b1f16e75873a04f;hp=901dceed32e872a9c52b1fe07949791648401104;hpb=9917807b03b64faf00f6a1f29dcb6eafc454efa5;p=yaffs-website
diff --git a/web/core/includes/menu.inc b/web/core/includes/menu.inc
index 901dceed3..89d489120 100644
--- a/web/core/includes/menu.inc
+++ b/web/core/includes/menu.inc
@@ -10,7 +10,7 @@
* @{
*/
-use Drupal\Component\Utility\SafeMarkup;
+use Drupal\Component\Render\FormattableMarkup;
use Drupal\Core\Render\Element;
/**
@@ -36,7 +36,7 @@ function template_preprocess_menu_local_task(&$variables) {
$variables['is_active'] = TRUE;
// Add text to indicate active tab for non-visual users.
- $active = SafeMarkup::format('@label', ['@label' => t('(active tab)')]);
+ $active = new FormattableMarkup('@label', ['@label' => t('(active tab)')]);
$link_text = t('@local-task-title@active', ['@local-task-title' => $link_text, '@active' => $active]);
}
@@ -161,8 +161,14 @@ function menu_local_tabs() {
*
* This should be called any time broad changes
* might have been made to the router items or menu links.
+ *
+ * @deprecated in Drupal 8.6.0, will be removed before Drupal 9.0.0. Use
+ * \Drupal::cache('menu')->invalidateAll() instead.
+ *
+ * @see https://www.drupal.org/node/2989138
*/
function menu_cache_clear_all() {
+ @trigger_error("menu_cache_clear_all() is deprecated in Drupal 8.6.0 and will be removed before Drupal 9.0.0. Use \Drupal::cache('menu')->invalidateAll() instead. See https://www.drupal.org/node/2989138", E_USER_DEPRECATED);
\Drupal::cache('menu')->invalidateAll();
}