Language.php in Views (for Drupal 7) 8.3
Same filename in this branch
- 8.3 lib/Views/node/Plugin/views/field/Language.php
- 8.3 lib/Views/user/Plugin/views/field/Language.php
- 8.3 lib/Views/language/Plugin/views/filter/Language.php
- 8.3 lib/Views/language/Plugin/views/argument/Language.php
- 8.3 lib/Views/language/Plugin/views/field/Language.php
- 8.3 lib/Views/taxonomy/Plugin/views/field/Language.php
Definition of Views\taxonomy\Plugin\views\field\Language.
Namespace
Views\taxonomy\Plugin\views\fieldFile
lib/Views/taxonomy/Plugin/views/field/Language.phpView source
<?php
/**
* @file
* Definition of Views\taxonomy\Plugin\views\field\Language.
*/
namespace Views\taxonomy\Plugin\views\field;
use Drupal\Core\Annotation\Plugin;
/**
* Field handler to show the language of a taxonomy term.
*
* @Plugin(
* id = "taxonomy_term_language"
* )
*/
class Language extends Taxonomy {
/**
* Overrides Views\taxonomy\Plugin\views\field\Taxonomy::render().
*/
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);
}
}