protected function InlineBlockEntityOperations::getPluginBlockId in Drupal 10
Same name and namespace in other branches
- 8 core/modules/layout_builder/src/InlineBlockEntityOperations.php \Drupal\layout_builder\InlineBlockEntityOperations::getPluginBlockId()
- 9 core/modules/layout_builder/src/InlineBlockEntityOperations.php \Drupal\layout_builder\InlineBlockEntityOperations::getPluginBlockId()
Gets a block ID for an inline block plugin.
Parameters
\Drupal\layout_builder\Plugin\Block\InlineBlock $block_plugin: The inline block plugin.
Return value
int The block content ID or null none available.
File
- core/
modules/ layout_builder/ src/ InlineBlockEntityOperations.php, line 180
Class
- InlineBlockEntityOperations
- Defines a class for reacting to entity events related to Inline Blocks.
Namespace
Drupal\layout_builderCode
protected function getPluginBlockId(InlineBlock $block_plugin) {
$configuration = $block_plugin
->getConfiguration();
if (!empty($configuration['block_revision_id'])) {
$revision_ids = $this
->getBlockIdsForRevisionIds([
$configuration['block_revision_id'],
]);
return array_pop($revision_ids);
}
return NULL;
}