You are here

public function LayoutBuilderRestrictionInterface::alterSectionDefinitions in Layout Builder Restrictions 8.2

Alter the layout definitions.

This will be called when the layout list is being populated. A plugin can manipulate the definitions as needed.

Parameters

array $definitions: All the available layout definitions.

array $context: At a minimum, the entity, view_mode, layout, and region. Depending on the plugin, they may or may not ignore some of these contexts.

Return value

array A modified layout definition array.

1 method overrides LayoutBuilderRestrictionInterface::alterSectionDefinitions()
LayoutBuilderRestrictionBase::alterSectionDefinitions in src/Plugin/LayoutBuilderRestrictionBase.php
Alter the section definitions.

File

src/Plugin/LayoutBuilderRestrictionInterface.php, line 49

Class

LayoutBuilderRestrictionInterface
Defines an interface for Layout builder restriction plugin plugins.

Namespace

Drupal\layout_builder_restrictions\Plugin

Code

public function alterSectionDefinitions(array $definitions, array $context);