function NavigationSectionStorage::deriveContextsFromRoute

Same name in other branches
  1. 11.x core/modules/navigation/src/Plugin/SectionStorage/NavigationSectionStorage.php \Drupal\navigation\Plugin\SectionStorage\NavigationSectionStorage::deriveContextsFromRoute()

Overrides SectionStorageInterface::deriveContextsFromRoute

File

core/modules/navigation/src/Plugin/SectionStorage/NavigationSectionStorage.php, line 161

Class

NavigationSectionStorage
Provides navigation section storage.

Namespace

Drupal\navigation\Plugin\SectionStorage

Code

public function deriveContextsFromRoute($value, $definition, $name, array $defaults) : array {
    return [
        'navigation' => new Context(new ContextDefinition('string'), 'navigation'),
    ];
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.