public function BlockEventVariables::getBlockContent in Hook Event Dispatcher 3.x
Same name and namespace in other branches
- 8.2 modules/preprocess_event_dispatcher/src/Variables/BlockEventVariables.php \Drupal\preprocess_event_dispatcher\Variables\BlockEventVariables::getBlockContent()
Get the block content.
Return value
null|\Drupal\block_content\BlockContentInterface Block Content Entity or NULL.
File
- modules/
preprocess_event_dispatcher/ src/ Variables/ BlockEventVariables.php, line 52
Class
- BlockEventVariables
- Class BlockEventVariables.
Namespace
Drupal\preprocess_event_dispatcher\VariablesCode
public function getBlockContent() : ?BlockContentInterface {
return $this->variables['content']['#block_content'] ?? NULL;
}