LayoutInterface
interface LayoutInterface implements PluginInspectionInterface, DerivativeInspectionInterface, ConfigurableInterface, DependentPluginInterface, ContextAwarePluginInterface (View source)
Provides an interface for static Layout plugins.
Methods
Gets the definition of the plugin implementation.
Gets the base_plugin_id of the plugin instance.
Gets the derivative_id of the plugin instance.
Sets the configuration for this plugin instance.
Calculates dependencies for the configured plugin.
Gets the context definitions of the plugin.
Gets a specific context definition of the plugin.
Gets the value for a defined context.
Sets the value for a defined context.
Validates the set values for the defined contexts.
Gets a mapping of the expected assignment names to their context names.
Sets a mapping of the expected assignment names to their context names.
Build a render array for layout with regions.
Details
string
getPluginId()
Gets the plugin_id of the plugin instance.
array
getPluginDefinition()
Gets the definition of the plugin implementation.
string
getBaseId()
Gets the base_plugin_id of the plugin instance.
string|null
getDerivativeId()
Gets the derivative_id of the plugin instance.
array
getConfiguration()
Gets this plugin's configuration.
setConfiguration(array $configuration)
Sets the configuration for this plugin instance.
array
defaultConfiguration()
Gets default configuration for this plugin.
array
calculateDependencies()
Calculates dependencies for the configured plugin.
Dependencies are saved in the plugin's configuration entity and are used to determine configuration synchronization order. For example, if the plugin integrates with specific user roles, this method should return an array of dependencies listing the specified roles.
ContextDefinitionInterface[]
getContextDefinitions()
Gets the context definitions of the plugin.
ContextDefinitionInterface
getContextDefinition(string $name)
Gets a specific context definition of the plugin.
array
getContexts()
Gets the defined contexts.
ContextInterface
getContext(string $name)
Gets a defined context.
array
getContextValues()
Gets the values for all defined contexts.
mixed
getContextValue(string $name)
Gets the value for a defined context.
setContext(string $name, ContextInterface $context)
Set a context on this plugin.
$this
setContextValue(string $name, mixed $value)
Sets the value for a defined context.
ConstraintViolationListInterface
validateContexts()
Validates the set values for the defined contexts.
array
getContextMapping()
Gets a mapping of the expected assignment names to their context names.
$this
setContextMapping(array $context_mapping)
Sets a mapping of the expected assignment names to their context names.
array
build(array $regions)
Build a render array for layout with regions.