class SectionStorageDefinition extends PluginDefinition implements ContextAwarePluginDefinitionInterface (View source)

Provides section storage type plugin definition.

Traits

Provides a trait for context-aware object-based plugin definitions.

Properties

protected string $id

The plugin ID.

from  PluginDefinition
protected string $class

A fully qualified class name.

from  PluginDefinition
protected string $provider

The plugin provider.

from  PluginDefinition
protected ContextDefinitionInterface[] $contextDefinitions

The context definitions for this plugin definition.

from  ContextAwarePluginDefinitionTrait
protected int $weight

The plugin weight.

protected array $additional

Any additional properties and values.

Methods

string
id()

Gets the unique identifier of the plugin.

setClass(string $class)

Sets the class.

string
getClass()

Gets the class.

string
getProvider()

Gets the plugin provider.

hasContextDefinition($name)

Implements \Drupal\Component\Plugin\Definition\ContextAwarePluginDefinitionInterface::hasContextDefinition().

getContextDefinitions()

Implements \Drupal\Component\Plugin\Definition\ContextAwarePluginDefinitionInterface::getContextDefinitions().

getContextDefinition($name)

Implements \Drupal\Component\Plugin\Definition\ContextAwarePluginDefinitionInterface::getContextDefinition().

addContextDefinition($name, ContextDefinitionInterface $definition)

Implements \Drupal\Component\Plugin\Definition\ContextAwarePluginDefinitionInterface::addContextDefinition().

removeContextDefinition($name)

Implements \Drupal\Component\Plugin\Definition\ContextAwarePluginDefinitionInterface::removeContextDefinition().

__construct(array $definition = [])

LayoutDefinition constructor.

mixed
get(string $property)

Gets any arbitrary property.

$this
set(string $property, mixed $value)

Sets a value to an arbitrary property.

int
getWeight()

Returns the plugin weight.

Details

string id()

Gets the unique identifier of the plugin.

Return Value

string

The unique identifier of the plugin.

PluginDefinitionInterface setClass(string $class)

Sets the class.

Parameters

string $class

A fully qualified class name.

Return Value

PluginDefinitionInterface

Exceptions

InvalidArgumentException

string getClass()

Gets the class.

Return Value

string

A fully qualified class name.

string getProvider()

Gets the plugin provider.

The provider is the name of the module that provides the plugin, or "core', or "component".

Return Value

string

The provider.

hasContextDefinition($name)

Implements \Drupal\Component\Plugin\Definition\ContextAwarePluginDefinitionInterface::hasContextDefinition().

Parameters

$name

getContextDefinitions()

Implements \Drupal\Component\Plugin\Definition\ContextAwarePluginDefinitionInterface::getContextDefinitions().

getContextDefinition($name)

Implements \Drupal\Component\Plugin\Definition\ContextAwarePluginDefinitionInterface::getContextDefinition().

Parameters

$name

addContextDefinition($name, ContextDefinitionInterface $definition)

Implements \Drupal\Component\Plugin\Definition\ContextAwarePluginDefinitionInterface::addContextDefinition().

Parameters

$name
ContextDefinitionInterface $definition

removeContextDefinition($name)

Implements \Drupal\Component\Plugin\Definition\ContextAwarePluginDefinitionInterface::removeContextDefinition().

Parameters

$name

__construct(array $definition = [])

LayoutDefinition constructor.

Parameters

array $definition

An array of values from the annotation.

mixed get(string $property)

Gets any arbitrary property.

Parameters

string $property

The property to retrieve.

Return Value

mixed

The value for that property, or NULL if the property does not exist.

$this set(string $property, mixed $value)

Sets a value to an arbitrary property.

Parameters

string $property

The property to use for the value.

mixed $value

The value to set.

Return Value

$this

int getWeight()

Returns the plugin weight.

Return Value

int

The plugin weight.