function hook_layout_builder_restrictions_allowed_layouts in Layout Builder Restrictions 8
Tell the module which layouts are allowed to use.
2 invocations of hook_layout_builder_restrictions_allowed_layouts()
- LayoutBuilderRestrictionsSubscriber::alterLayoutChooser in src/
EventSubscriber/ LayoutBuilderRestrictionsSubscriber.php - Alters the layouts available in Layout Builder's choose_section.
- layout_builder_restrictions_plugin_filter_layout__layout_builder_alter in ./
layout_builder_restrictions.module - Implements hook_plugin_filter_TYPE__CONSUMER_alter().
File
- ./
layout_builder_restrictions.api.php, line 51 - Api.php for layout_builder_restrictions.
Code
function hook_layout_builder_restrictions_allowed_layouts() {
// Only allow 'layout_onecol' to be used.
return [
'layout_onecol',
];
}