function Language::render in Views (for Drupal 7) 8.3
Same name in this branch
- 8.3 lib/Views/node/Plugin/views/field/Language.php \Views\node\Plugin\views\field\Language::render()
- 8.3 lib/Views/user/Plugin/views/field/Language.php \Views\user\Plugin\views\field\Language::render()
- 8.3 lib/Views/language/Plugin/views/field/Language.php \Views\language\Plugin\views\field\Language::render()
- 8.3 lib/Views/taxonomy/Plugin/views/field/Language.php \Views\taxonomy\Plugin\views\field\Language::render()
Render the field.
Parameters
$values: The values retrieved from the database.
Overrides FieldPluginBase::render
File
- lib/
Views/ language/ Plugin/ views/ field/ Language.php, line 42 - Definition of Views\language\Plugin\views\field\Language.
Class
- Language
- Field handler to translate a language into its readable form.
Namespace
Views\language\Plugin\views\fieldCode
function render($values) {
// @todo: Drupal Core dropped native language until config translation is
// ready, see http://drupal.org/node/1616594.
$value = $this
->get_value($values);
$language = language_load($value);
return $language ? $language->name : '';
}