function ContextAwarePluginManagerTrait::getDefinitionsForContexts

Same name in other branches
  1. 9 core/lib/Drupal/Core/Plugin/Context/ContextAwarePluginManagerTrait.php \Drupal\Core\Plugin\Context\ContextAwarePluginManagerTrait::getDefinitionsForContexts()
  2. 8.9.x core/lib/Drupal/Core/Plugin/Context/ContextAwarePluginManagerTrait.php \Drupal\Core\Plugin\Context\ContextAwarePluginManagerTrait::getDefinitionsForContexts()
  3. 11.x core/lib/Drupal/Core/Plugin/Context/ContextAwarePluginManagerTrait.php \Drupal\Core\Plugin\Context\ContextAwarePluginManagerTrait::getDefinitionsForContexts()

See \Drupal\Core\Plugin\Context\ContextAwarePluginManagerInterface::getDefinitionsForContexts().

1 call to ContextAwarePluginManagerTrait::getDefinitionsForContexts()
FilteredPluginManagerTrait::getFilteredDefinitions in core/lib/Drupal/Core/Plugin/FilteredPluginManagerTrait.php
Implements \Drupal\Core\Plugin\FilteredPluginManagerInterface::getFilteredDefinitions().

File

core/lib/Drupal/Core/Plugin/Context/ContextAwarePluginManagerTrait.php, line 22

Class

ContextAwarePluginManagerTrait
Provides a trait for plugin managers that support context-aware plugins.

Namespace

Drupal\Core\Plugin\Context

Code

public function getDefinitionsForContexts(array $contexts = []) {
    return $this->contextHandler()
        ->filterPluginDefinitionsByContexts($contexts, $this->getDefinitions());
}

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