8.5.x ContextAwarePluginInterface.php ContextAwarePluginInterface::getContextMapping()
8.0.x ContextAwarePluginInterface.php ContextAwarePluginInterface::getContextMapping()
8.1.x ContextAwarePluginInterface.php ContextAwarePluginInterface::getContextMapping()
8.2.x ContextAwarePluginInterface.php ContextAwarePluginInterface::getContextMapping()
8.3.x ContextAwarePluginInterface.php ContextAwarePluginInterface::getContextMapping()
8.4.x ContextAwarePluginInterface.php ContextAwarePluginInterface::getContextMapping()
8.6.x ContextAwarePluginInterface.php ContextAwarePluginInterface::getContextMapping()

Gets a mapping of the expected assignment names to their context names.

Return value

array A mapping of the expected assignment names to their context names. For example, if one of the $contexts is named 'user.current_user', but the plugin expects a context named 'user', then this map would contain 'user' => 'user.current_user'.

1 method overrides ContextAwarePluginInterface::getContextMapping()
ContextAwarePluginBase::getContextMapping in core/lib/Drupal/Core/Plugin/ContextAwarePluginBase.php
Gets a mapping of the expected assignment names to their context names.

File

core/lib/Drupal/Component/Plugin/ContextAwarePluginInterface.php, line 132

Class

ContextAwarePluginInterface
Interface for defining context aware plugins.

Namespace

Drupal\Component\Plugin

Code

public function getContextMapping();