You are here

public function Language::getLabel in Config Pages 8.2

Same name and namespace in other branches
  1. 8.3 src/Plugin/ConfigPagesContext/Language.php \Drupal\config_pages\Plugin\ConfigPagesContext\Language::getLabel()

Get the label of the context.

Return value

string Return the label of the context.

Overrides ConfigPagesContextBase::getLabel

File

src/Plugin/ConfigPagesContext/Language.php, line 65

Class

Language
Provides a language config pages context.

Namespace

Drupal\config_pages\Plugin\ConfigPagesContext

Code

public function getLabel() {
  return $this->languageManager
    ->getCurrentLanguage()
    ->getName();
}