public function ContextAwarePluginInterface::getContexts in Drupal 10
Same name and namespace in other branches
- 8 core/lib/Drupal/Component/Plugin/ContextAwarePluginInterface.php \Drupal\Component\Plugin\ContextAwarePluginInterface::getContexts()
- 9 core/lib/Drupal/Component/Plugin/ContextAwarePluginInterface.php \Drupal\Component\Plugin\ContextAwarePluginInterface::getContexts()
Gets the defined contexts.
Return value
array The set context objects.
Throws
\Drupal\Component\Plugin\Exception\ContextException If contexts are defined but not set.
File
- core/
lib/ Drupal/ Component/ Plugin/ ContextAwarePluginInterface.php, line 48
Class
- ContextAwarePluginInterface
- Interface for defining context aware plugins.
Namespace
Drupal\Component\PluginCode
public function getContexts();