You are here

public function MenuLinkContentVisibilityCache::getCacheContexts in Custom Menu Links Visibility 8

File

src/MenuLinkContentVisibilityCache.php, line 54

Class

MenuLinkContentVisibilityCache

Namespace

Drupal\menu_link_content_visibility

Code

public function getCacheContexts() {
  $cache_contexts = [];
  foreach ($this->conditions as $condition) {
    $cache_contexts = Cache::mergeContexts($cache_contexts, $condition
      ->getCacheContexts());
  }
  return $cache_contexts;
}