public function LayoutBuilderRestrictionBase::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.
Overrides LayoutBuilderRestrictionInterface::blockAllowedinContext
2 methods override LayoutBuilderRestrictionBase::blockAllowedinContext()
- EntityViewModeRestriction::blockAllowedinContext in src/
Plugin/ LayoutBuilderRestriction/ EntityViewModeRestriction.php - Determine whether the block being moved is allowed to the destination.
- EntityViewModeRestrictionByRegion::blockAllowedinContext in modules/
layout_builder_restrictions_by_region/ src/ Plugin/ LayoutBuilderRestriction/ EntityViewModeRestrictionByRegion.php - Determine whether the block being moved is allowed to the destination.
File
- src/
Plugin/ LayoutBuilderRestrictionBase.php, line 34
Class
- LayoutBuilderRestrictionBase
- Base class 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) {
return TRUE;
}