protected function ReusableBlocksController::isBundleOfReusableBlock in Gutenberg 8
Creates block from given id and check its bundle.
Parameters
string $block_id: Block ID.
Return value
bool TRUE if the block is bundle of reusable_block, FALSE otherwise.
1 call to ReusableBlocksController::isBundleOfReusableBlock()
- ReusableBlocksController::access in src/
Controller/ ReusableBlocksController.php - Controller routes access callback.
File
- src/
Controller/ ReusableBlocksController.php, line 171
Class
- ReusableBlocksController
- Returns responses for our blocks routes.
Namespace
Drupal\gutenberg\ControllerCode
protected function isBundleOfReusableBlock($block_id) {
$block = BlockContent::load($block_id);
return $block
->bundle() === 'reusable_block';
}