You are here

class LinkPluginDefinitionDecorator in Plugin 8.2

Provides a link (menu link, local action/task) plugin definition decorator.

Hierarchy

Expanded class hierarchy of LinkPluginDefinitionDecorator

1 file declares its use of LinkPluginDefinitionDecorator
LinkPluginDefinitionDecoratorTest.php in tests/src/Unit/PluginDefinition/LinkPluginDefinitionDecoratorTest.php
1 string reference to 'LinkPluginDefinitionDecorator'
plugin.plugin_type.yml in ./plugin.plugin_type.yml
plugin.plugin_type.yml

File

src/PluginDefinition/LinkPluginDefinitionDecorator.php, line 10

Namespace

Drupal\plugin\PluginDefinition
View source
class LinkPluginDefinitionDecorator extends ArrayPluginDefinitionDecorator {

  /**
   * {@inheritdoc}
   */
  public function setLabel($label) {
    $this->arrayDefinition['title'] = $label;
    return $this;
  }

  /**
   * {@inheritdoc}
   */
  public function getLabel() {
    return isset($this->arrayDefinition['title']) ? $this->arrayDefinition['title'] : NULL;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
ArrayPluginDefinitionDecorator::$arrayDefinition protected property The array definition.
ArrayPluginDefinitionDecorator::count public function
ArrayPluginDefinitionDecorator::createFromDecoratedDefinition public static function Creates a new plugin definition that decorates another definition. Overrides PluginDefinitionDecoratorInterface::createFromDecoratedDefinition
ArrayPluginDefinitionDecorator::doMergeDefaultDefinition public function Merges another definition into this one, using the other for defaults. Overrides MergeablePluginDefinitionTrait::doMergeDefaultDefinition
ArrayPluginDefinitionDecorator::doMergeOverrideDefinition public function Merges another definition into this one, using the other for overrides. Overrides MergeablePluginDefinitionTrait::doMergeOverrideDefinition
ArrayPluginDefinitionDecorator::getArrayDefinition public function Gets the array definition. Overrides ArrayPluginDefinitionInterface::getArrayDefinition
ArrayPluginDefinitionDecorator::getCategory public function Gets the category. Overrides PluginCategoryDefinitionInterface::getCategory
ArrayPluginDefinitionDecorator::getClass public function Gets the class. Overrides PluginDefinitionInterface::getClass
ArrayPluginDefinitionDecorator::getConfigDependencies public function Gets the dependencies. Overrides PluginConfigDependenciesDefinitionInterface::getConfigDependencies
ArrayPluginDefinitionDecorator::getContextDefinition public function Gets a specific context definition. Overrides PluginContextDefinitionInterface::getContextDefinition
ArrayPluginDefinitionDecorator::getContextDefinitions public function Gets the context definitions. Overrides PluginContextDefinitionInterface::getContextDefinitions
ArrayPluginDefinitionDecorator::getDeriverClass public function Gets the deriver class. Overrides PluginDeriverDefinitionInterface::getDeriverClass
ArrayPluginDefinitionDecorator::getDescription public function Gets the human-readable plugin description. Overrides PluginDescriptionDefinitionInterface::getDescription
ArrayPluginDefinitionDecorator::getId public function Gets the plugin ID. Overrides PluginDefinitionInterface::getId
ArrayPluginDefinitionDecorator::getIterator public function
ArrayPluginDefinitionDecorator::getOperationsProviderClass public function Gets the operations provider class. Overrides PluginOperationsProviderDefinitionInterface::getOperationsProviderClass
ArrayPluginDefinitionDecorator::getParentId public function Gets the ID of the parent plugin. Overrides PluginHierarchyDefinitionInterface::getParentId
ArrayPluginDefinitionDecorator::getProvider public function Gets the plugin provider. Overrides PluginDefinitionInterface::getProvider
ArrayPluginDefinitionDecorator::hasContextDefinition public function Checks if a specific context definition exists. Overrides PluginContextDefinitionInterface::hasContextDefinition
ArrayPluginDefinitionDecorator::id public function Gets the unique identifier of the plugin. Overrides PluginDefinitionInterface::id
ArrayPluginDefinitionDecorator::isDefinitionCompatible protected function Returns whether another definition is compatible with this one. Overrides MergeablePluginDefinitionTrait::isDefinitionCompatible
ArrayPluginDefinitionDecorator::mergeDefaultArrayDefinition public function Merges another array definition into this one, using the other for defaults. Overrides ArrayPluginDefinitionInterface::mergeDefaultArrayDefinition
ArrayPluginDefinitionDecorator::mergeOverrideArrayDefinition public function Merges another array definition into this one, using the other for overrides. Overrides ArrayPluginDefinitionInterface::mergeOverrideArrayDefinition
ArrayPluginDefinitionDecorator::offsetExists public function
ArrayPluginDefinitionDecorator::offsetGet public function
ArrayPluginDefinitionDecorator::offsetSet public function
ArrayPluginDefinitionDecorator::offsetUnset public function
ArrayPluginDefinitionDecorator::setCategory public function Sets the category. Overrides PluginCategoryDefinitionInterface::setCategory
ArrayPluginDefinitionDecorator::setClass public function Sets the class. Overrides PluginDefinitionInterface::setClass
ArrayPluginDefinitionDecorator::setConfigDependencies public function Sets the dependencies. Overrides PluginConfigDependenciesDefinitionInterface::setConfigDependencies
ArrayPluginDefinitionDecorator::setContextDefinition public function Sets a specific context definition. Overrides PluginContextDefinitionInterface::setContextDefinition
ArrayPluginDefinitionDecorator::setContextDefinitions public function Sets the context definitions. Overrides PluginContextDefinitionInterface::setContextDefinitions
ArrayPluginDefinitionDecorator::setDeriverClass public function Sets the deriver class. Overrides PluginDeriverDefinitionInterface::setDeriverClass
ArrayPluginDefinitionDecorator::setDescription public function Sets the human-readable plugin description. Overrides PluginDescriptionDefinitionInterface::setDescription
ArrayPluginDefinitionDecorator::setId public function Sets the plugin ID. Overrides PluginDefinitionInterface::setId
ArrayPluginDefinitionDecorator::setOperationsProviderClass public function Sets the operations provider class. Overrides PluginOperationsProviderDefinitionInterface::setOperationsProviderClass
ArrayPluginDefinitionDecorator::setParentId public function Sets the ID of the parent plugin. Overrides PluginHierarchyDefinitionInterface::setParentId
ArrayPluginDefinitionDecorator::setProvider public function Sets the plugin provider. Overrides PluginDefinitionInterface::setProvider
ArrayPluginDefinitionDecorator::__construct public function Constructs a new instance.
LinkPluginDefinitionDecorator::getLabel public function Gets the human-readable plugin label. Overrides ArrayPluginDefinitionDecorator::getLabel
LinkPluginDefinitionDecorator::setLabel public function Sets the human-readable plugin label. Overrides ArrayPluginDefinitionDecorator::setLabel
MergeablePluginDefinitionTrait::mergeDefaultDefinition public function Implements \Drupal\plugin\PluginDefinition\PluginDefinitionInterface::mergeDefaultDefinition().
MergeablePluginDefinitionTrait::mergeOverrideDefinition public function Implements \Drupal\plugin\PluginDefinition\PluginDefinitionInterface::mergeOverrideDefinition().
MergeablePluginDefinitionTrait::validateMergeDefinition protected function Validates whether another definition is compatible with this one.