You are here

public function CurrentLanguage::getLanguage in Twig Extender 8.2

Same name and namespace in other branches
  1. 8.4 src/Plugin/TwigPlugin/CurrentLanguage.php \Drupal\twig_extender\Plugin\TwigPlugin\CurrentLanguage::getLanguage()
  2. 8 src/Plugin/TwigPlugin/CurrentLanguage.php \Drupal\twig_extender\Plugin\TwigPlugin\CurrentLanguage::getLanguage()
  3. 8.3 src/Plugin/TwigPlugin/CurrentLanguage.php \Drupal\twig_extender\Plugin\TwigPlugin\CurrentLanguage::getLanguage()
  4. 4.x src/Plugin/TwigPlugin/CurrentLanguage.php \Drupal\twig_extender\Plugin\TwigPlugin\CurrentLanguage::getLanguage()

Returns current language.

File

src/Plugin/TwigPlugin/CurrentLanguage.php, line 23

Class

CurrentLanguage
The plugin for check authenticated user.

Namespace

Drupal\twig_extender\Plugin\TwigPlugin

Code

public function getLanguage() {
  return \Drupal::languageManager()
    ->getCurrentLanguage();
}