Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. ContextAwarePluginTrait.php

function ContextAwarePluginTrait::getContextMapping

1 method overrides ContextAwarePluginTrait::getContextMapping()
NavigationSectionStorage::getContextMapping in core/modules/navigation/src/Plugin/SectionStorage/NavigationSectionStorage.php
Gets a mapping of the expected assignment names to their context names.

File

core/lib/Drupal/Core/Plugin/ContextAwarePluginTrait.php, line 96

Class

ContextAwarePluginTrait
Provides a trait to add context-aware functionality to plugins.

Namespace

Drupal\Core\Plugin

Code

public function getContextMapping() {
    $configuration = $this instanceof ConfigurableInterface ? $this->getConfiguration() : $this->configuration;
    return $configuration['context_mapping'] ?? [];
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal