You are here

public function Language::render in Views (for Drupal 7) 8.3

Same name in this branch
  1. 8.3 lib/Views/node/Plugin/views/field/Language.php \Views\node\Plugin\views\field\Language::render()
  2. 8.3 lib/Views/user/Plugin/views/field/Language.php \Views\user\Plugin\views\field\Language::render()
  3. 8.3 lib/Views/language/Plugin/views/field/Language.php \Views\language\Plugin\views\field\Language::render()
  4. 8.3 lib/Views/taxonomy/Plugin/views/field/Language.php \Views\taxonomy\Plugin\views\field\Language::render()

Overrides Views\taxonomy\Plugin\views\field\Taxonomy::render().

Overrides Taxonomy::render

File

lib/Views/taxonomy/Plugin/views/field/Language.php, line 24
Definition of Views\taxonomy\Plugin\views\field\Language.

Class

Language
Field handler to show the language of a taxonomy term.

Namespace

Views\taxonomy\Plugin\views\field

Code

public function render($values) {
  $value = $this
    ->get_value($values);
  $language = language_load($value);
  $value = $language ? $language->name : '';
  return $this
    ->render_link($this
    ->sanitizeValue($value), $values);
}