You are here

public function Language::getValue 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::getValue()
  2. 8 src/Plugin/ConfigPagesContext/Language.php \Drupal\config_pages\Plugin\ConfigPagesContext\Language::getValue()

Get the value of the context.

Return value

mixed Return value of the context.

Overrides ConfigPagesContextBase::getValue

1 call to Language::getValue()
Language::getLinks in src/Plugin/ConfigPagesContext/Language.php
Get array of available links to switch on given context.

File

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

Class

Language
Provides a language config pages context.

Namespace

Drupal\config_pages\Plugin\ConfigPagesContext

Code

public function getValue() {
  $lang = $this->languageManager
    ->getCurrentLanguage(LanguageInterface::TYPE_URL);
  return $lang
    ->getId();
}