abstract class LayoutBuilderRestrictionBase in Layout Builder Restrictions 8.2
Base class for Layout builder restriction plugin plugins.
Hierarchy
- class \Drupal\Component\Plugin\PluginBase implements DerivativeInspectionInterface, PluginInspectionInterface
- class \Drupal\layout_builder_restrictions\Plugin\LayoutBuilderRestrictionBase implements ContainerFactoryPluginInterface, LayoutBuilderRestrictionInterface uses PluginHelperTrait
Expanded class hierarchy of LayoutBuilderRestrictionBase
2 files declare their use of LayoutBuilderRestrictionBase
- EntityViewModeRestriction.php in src/
Plugin/ LayoutBuilderRestriction/ EntityViewModeRestriction.php - EntityViewModeRestrictionByRegion.php in modules/
layout_builder_restrictions_by_region/ src/ Plugin/ LayoutBuilderRestriction/ EntityViewModeRestrictionByRegion.php
File
- src/
Plugin/ LayoutBuilderRestrictionBase.php, line 13
Namespace
Drupal\layout_builder_restrictions\PluginView source
abstract class LayoutBuilderRestrictionBase extends PluginBase implements LayoutBuilderRestrictionInterface, ContainerFactoryPluginInterface {
use PluginHelperTrait;
/**
* Alter the block definitions.
*/
public function alterBlockDefinitions(array $definitions, array $context) {
return $definitions;
}
/**
* Alter the section definitions.
*/
public function alterSectionDefinitions(array $definitions, array $context) {
return $definitions;
}
/**
* {@inheritdoc}
*/
public function blockAllowedinContext(SectionStorageInterface $section_storage, $delta_from, $delta_to, $region_to, $block_uuid, $preceding_block_uuid = NULL) {
return TRUE;
}
/**
* {@inheritdoc}
*/
public function inlineBlocksAllowedinContext(SectionStorageInterface $section_storage, $delta, $region) {
return $this
->getInlineBlockPlugins();
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
ContainerFactoryPluginInterface:: |
public static | function | Creates an instance of the plugin. | 112 |
LayoutBuilderContextTrait:: |
protected | property | The context repository. | |
LayoutBuilderContextTrait:: |
protected | function | Gets the context repository service. | |
LayoutBuilderContextTrait:: |
protected | function | Provides all available contexts, both global and section_storage-specific. | |
LayoutBuilderRestrictionBase:: |
public | function |
Alter the block definitions. Overrides LayoutBuilderRestrictionInterface:: |
2 |
LayoutBuilderRestrictionBase:: |
public | function |
Alter the section definitions. Overrides LayoutBuilderRestrictionInterface:: |
2 |
LayoutBuilderRestrictionBase:: |
public | function |
Determine whether the block being moved is allowed to the destination. Overrides LayoutBuilderRestrictionInterface:: |
2 |
LayoutBuilderRestrictionBase:: |
public | function |
Returns an array of allowed inline blocks in a given context. Overrides LayoutBuilderRestrictionInterface:: |
2 |
PluginBase:: |
protected | property | Configuration information passed into the plugin. | 1 |
PluginBase:: |
protected | property | The plugin implementation definition. | 1 |
PluginBase:: |
protected | property | The plugin_id. | |
PluginBase:: |
constant | A string which is used to separate base plugin IDs from the derivative ID. | ||
PluginBase:: |
public | function |
Gets the base_plugin_id of the plugin instance. Overrides DerivativeInspectionInterface:: |
|
PluginBase:: |
public | function |
Gets the derivative_id of the plugin instance. Overrides DerivativeInspectionInterface:: |
|
PluginBase:: |
public | function |
Gets the definition of the plugin implementation. Overrides PluginInspectionInterface:: |
3 |
PluginBase:: |
public | function |
Gets the plugin_id of the plugin instance. Overrides PluginInspectionInterface:: |
|
PluginBase:: |
public | function | Determines if the plugin is configurable. | |
PluginBase:: |
public | function | Constructs a \Drupal\Component\Plugin\PluginBase object. | 92 |
PluginHelperTrait:: |
private | function | Gets the block manager. | |
PluginHelperTrait:: |
public | function | Helper function to check the default block category whitelist. | |
PluginHelperTrait:: |
private | function | Gets the context handler. | |
PluginHelperTrait:: |
private | function | Gets the entity bundle interface. | |
PluginHelperTrait:: |
protected | function | Gets block definitions appropriate for an entity display. | |
PluginHelperTrait:: |
protected | function | Generate a categorized list of blocks, based on the untranslated category. | |
PluginHelperTrait:: |
public | function | Method to categorize blocks in a multilingual-friendly way. | |
PluginHelperTrait:: |
public | function | Gets a list of all plugins available as Inline Blocks. | |
PluginHelperTrait:: |
protected | function | Gets layout definitions. | |
PluginHelperTrait:: |
protected | function | Sort block categories alphabetically. | |
PluginHelperTrait:: |
public | function | Helper function to return an untranslated block Category. | |
PluginHelperTrait:: |
public | function | A helper function to return values derivable from section storage. | |
PluginHelperTrait:: |
private | function | Gets the layout plugin manager. | |
PluginHelperTrait:: |
private | function | Gets the section storage manager. | |
StringTranslationTrait:: |
protected | property | The string translation service. | 1 |
StringTranslationTrait:: |
protected | function | Formats a string containing a count of items. | |
StringTranslationTrait:: |
protected | function | Returns the number of plurals supported by a given language. | |
StringTranslationTrait:: |
protected | function | Gets the string translation service. | |
StringTranslationTrait:: |
public | function | Sets the string translation service to use. | 2 |
StringTranslationTrait:: |
protected | function | Translates a string to the current language or to a given language. |