You are here

public function BaseExtension::getLabel in Markdown 3.0.x

Displays the human-readable label of the plugin.

Parameters

bool $version: Flag indicating whether to show the version with the label.

Return value

\Drupal\Core\StringTranslation\TranslatableMarkup The label.

Overrides MarkdownInstallablePluginInterface::getLabel

File

src/Plugin/Markdown/Extension/BaseExtension.php, line 101

Class

BaseExtension
Base class for markdown extensions.

Namespace

Drupal\markdown\Plugin\Markdown\Extension

Code

public function getLabel($version = TRUE) {
  $label = $this->pluginDefinition['label'] ?? $this->pluginId;
  if ($version && ($version = $this
    ->getVersion())) {
    $label .= " ({$version})";
  }
  return $label;
}