You are here

public function SourcePluginBase::getItemTypeLabel in Translation Management Tool 8

Returns the label of a source item type.

Parameters

$type: The identifier of a source item type.

Overrides SourcePluginInterface::getItemTypeLabel

1 call to SourcePluginBase::getItemTypeLabel()
LocaleSource::getType in sources/locale/src/Plugin/tmgmt/Source/LocaleSource.php
[@inheritdoc}
2 methods override SourcePluginBase::getItemTypeLabel()
ConfigSource::getItemTypeLabel in sources/tmgmt_config/src/Plugin/tmgmt/Source/ConfigSource.php
Returns the label of a source item type.
ContentEntitySource::getItemTypeLabel in sources/content/src/Plugin/tmgmt/Source/ContentEntitySource.php
Returns the label of a source item type.

File

src/SourcePluginBase.php, line 38

Class

SourcePluginBase
Default controller class for source plugins.

Namespace

Drupal\tmgmt

Code

public function getItemTypeLabel($type) {
  $types = $this
    ->getItemTypes();
  if (isset($types[$type])) {
    return $types[$type];
  }
  return '';
}