You are here

public function LinkPluginDefinitionDecorator::setLabel in Plugin 8.2

Sets the human-readable plugin label.

Parameters

\Drupal\Core\StringTranslation\TranslatableString|string $label: The label.

Return value

$this

Overrides ArrayPluginDefinitionDecorator::setLabel

File

src/PluginDefinition/LinkPluginDefinitionDecorator.php, line 15

Class

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

Namespace

Drupal\plugin\PluginDefinition

Code

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