public function BodyClass::execute in Context 8
Same name and namespace in other branches
- 8.4 src/Plugin/ContextReaction/BodyClass.php \Drupal\context\Plugin\ContextReaction\BodyClass::execute()
Executes the plugin.
Overrides ExecutableInterface::execute
File
- src/
Plugin/ ContextReaction/ BodyClass.php, line 37
Class
- BodyClass
- Provides a content reaction that adds a new css class.
Namespace
Drupal\context\Plugin\ContextReactionCode
public function execute(array &$vars = []) {
return [
'class' => explode(' ', $this
->getConfiguration()['body_class']),
];
}