protected function PluginHelperTrait::getDefinitionsByUntranslatedCategory in Layout Builder Restrictions 8.2
Generate a categorized list of blocks, based on the untranslated category.
Parameters
array $definitions: The uncategorized definitions.
Return value
array The categorized definitions.
1 call to PluginHelperTrait::getDefinitionsByUntranslatedCategory()
- PluginHelperTrait::getBlockDefinitions in src/
Traits/ PluginHelperTrait.php - Gets block definitions appropriate for an entity display.
File
- src/
Traits/ PluginHelperTrait.php, line 107
Class
- PluginHelperTrait
- Methods to help Layout Builder Restrictions plugins.
Namespace
Drupal\layout_builder_restrictions\TraitsCode
protected function getDefinitionsByUntranslatedCategory(array $definitions) {
$definitions = $this
->getGroupedDefinitions($definitions, 'admin_label');
// Do not display the 'broken' plugin in the UI.
unset($definitions[$this
->t('Block')
->render()]['definitions']['broken']);
return $definitions;
}