public function ContextAwarePluginManagerTrait::getDefinitionsForContexts in Drupal 9
Same name and namespace in other branches
- 8 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\ContextCode
public function getDefinitionsForContexts(array $contexts = []) {
return $this
->contextHandler()
->filterPluginDefinitionsByContexts($contexts, $this
->getDefinitions());
}