You are here

public function CKEditor5PluginDefinition::label in Drupal 10

Gets the human-readable name of the CKEditor plugin.

Return value

\Drupal\Core\StringTranslation\TranslatableMarkup

See also

\Drupal\ckeditor5\Annotation\DrupalAspectsOfCKEditor5Plugin::$label

File

core/modules/ckeditor5/src/Plugin/CKEditor5PluginDefinition.php, line 326

Class

CKEditor5PluginDefinition
Provides an implementation of a CKEditor 5 plugin definition.

Namespace

Drupal\ckeditor5\Plugin

Code

public function label() : TranslatableMarkup {
  $label = $this->drupal['label'];
  if (!$label instanceof TranslatableMarkup) {
    $label = new TranslatableMarkup($label);
  }
  return $label;
}