public function BlockStyleBase::setBlockContentBundle in Block Style Plugins 8
Set the block content bundle type.
1 call to BlockStyleBase::setBlockContentBundle()
- BlockStyleBase::prepareForm in src/
Plugin/ BlockStyleBase.php - Returns the configuration form elements specific to a block configuration.
File
- src/
Plugin/ BlockStyleBase.php, line 383
Class
- BlockStyleBase
- Base class for Block style plugins.
Namespace
Drupal\block_style_plugins\PluginCode
public function setBlockContentBundle() {
$base_id = $this->blockPlugin
->getBaseId();
$uuid = $this->blockPlugin
->getDerivativeId();
if ($base_id == 'block_content') {
$plugin = $this->entityRepository
->loadEntityByUuid('block_content', $uuid);
if ($plugin) {
$this->blockContentBundle = $plugin
->bundle();
}
}
}