You are here

function menu_link_content_visibility_preprocess_superfish in Custom Menu Links Visibility 8

Implements hook_preprocess_HOOK().

File

./menu_link_content_visibility.module, line 124

Code

function menu_link_content_visibility_preprocess_superfish(&$variables) {
  $variables['menu_items']['#tree'] = _menu_link_content_visibility_preprocess_superfish_items($variables['menu_items']['#tree']);
  if (empty($variables['#cache']['contexts'])) {
    $variables['#cache']['contexts'] = [];
  }
  $variables['#cache']['contexts'] = Cache::mergeContexts($variables['#cache']['contexts'], _menu_link_content_visibility_preprocess_superfish_items_cache_contexts($variables['menu_items']['#tree']));
  if (empty($variables['#cache']['tags'])) {
    $variables['#cache']['tags'] = [];
  }
  $variables['#cache']['tags'] = Cache::mergeTags($variables['#cache']['tags'], _menu_link_content_visibility_preprocess_superfish_items_cache_tags($variables['menu_items']['#tree']));
}