LayoutBuilderRestrictionBase.php in Layout Builder Restrictions 8.2
File
src/Plugin/LayoutBuilderRestrictionBase.php
View source
<?php
namespace Drupal\layout_builder_restrictions\Plugin;
use Drupal\Component\Plugin\PluginBase;
use Drupal\layout_builder\SectionStorageInterface;
use Drupal\layout_builder_restrictions\Traits\PluginHelperTrait;
use Drupal\Core\Plugin\ContainerFactoryPluginInterface;
abstract class LayoutBuilderRestrictionBase extends PluginBase implements LayoutBuilderRestrictionInterface, ContainerFactoryPluginInterface {
use PluginHelperTrait;
public function alterBlockDefinitions(array $definitions, array $context) {
return $definitions;
}
public function alterSectionDefinitions(array $definitions, array $context) {
return $definitions;
}
public function blockAllowedinContext(SectionStorageInterface $section_storage, $delta_from, $delta_to, $region_to, $block_uuid, $preceding_block_uuid = NULL) {
return TRUE;
}
public function inlineBlocksAllowedinContext(SectionStorageInterface $section_storage, $delta, $region) {
return $this
->getInlineBlockPlugins();
}
}