public function PluginHelperTrait::getInlineBlockPlugins in Layout Builder Restrictions 8.2
Gets a list of all plugins available as Inline Blocks.
Return value
array An array of inline block plugins.
3 calls to PluginHelperTrait::getInlineBlockPlugins()
- EntityViewModeRestriction::inlineBlocksAllowedinContext in src/
Plugin/ LayoutBuilderRestriction/ EntityViewModeRestriction.php - Returns an array of allowed inline blocks in a given context.
- EntityViewModeRestrictionByRegion::inlineBlocksAllowedinContext in modules/
layout_builder_restrictions_by_region/ src/ Plugin/ LayoutBuilderRestriction/ EntityViewModeRestrictionByRegion.php - Returns an array of allowed inline blocks in a given context.
- LayoutBuilderRestrictionBase::inlineBlocksAllowedinContext in src/
Plugin/ LayoutBuilderRestrictionBase.php - Returns an array of allowed inline blocks in a given context.
File
- src/
Traits/ PluginHelperTrait.php, line 312
Class
- PluginHelperTrait
- Methods to help Layout Builder Restrictions plugins.
Namespace
Drupal\layout_builder_restrictions\TraitsCode
public function getInlineBlockPlugins() {
$bundles = \Drupal::service('entity_type.bundle.info')
->getBundleInfo('block_content');
$inline_blocks = [];
foreach ($bundles as $machine_name => $bundle) {
$inline_blocks[] = 'inline_block:' . $machine_name;
}
return $inline_blocks;
}