You are here

public function ContextAwarePluginManagerTrait::getDefinitionsForContexts in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/lib/Drupal/Core/Plugin/Context/ContextAwarePluginManagerTrait.php \Drupal\Core\Plugin\Context\ContextAwarePluginManagerTrait::getDefinitionsForContexts()

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

File

core/lib/Drupal/Core/Plugin/Context/ContextAwarePluginManagerTrait.php, line 27
Contains \Drupal\Core\Plugin\Context\ContextAwarePluginManagerTrait.

Class

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

Namespace

Drupal\Core\Plugin\Context

Code

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