public function LayoutBuilderRestrictionInterface::blockAllowedinContext in Layout Builder Restrictions 8.2
Determine whether the block being moved is allowed to the destination.
Parameters
\Drupal\layout_builder\SectionStorageInterface $section_storage: The section storage.
int $delta_from: The delta of the original section.
int $delta_to: The delta of the destination section.
string $region_to: The new region for this block.
string $block_uuid: The UUID for this block.
string|null $preceding_block_uuid: (optional) If provided, the UUID of the block to insert this block after.
Return value
mixed TRUE if the block is allowed, or a string error message explaining the restriction.
1 method overrides LayoutBuilderRestrictionInterface::blockAllowedinContext()
- LayoutBuilderRestrictionBase::blockAllowedinContext in src/
Plugin/ LayoutBuilderRestrictionBase.php - Determine whether the block being moved is allowed to the destination.
File
- src/
Plugin/ LayoutBuilderRestrictionInterface.php, line 71
Class
- LayoutBuilderRestrictionInterface
- Defines an interface for Layout builder restriction plugin plugins.
Namespace
Drupal\layout_builder_restrictions\PluginCode
public function blockAllowedinContext(SectionStorageInterface $section_storage, $delta_from, $delta_to, $region_to, $block_uuid, $preceding_block_uuid = NULL);