function LanguageField::render

Render the field.

Parameters

$values: The values retrieved from the database.

Overrides FieldPluginBase::render

File

drupal/core/modules/language/lib/Drupal/language/Plugin/views/field/LanguageField.php, line 42
Contains Drupal\language\Plugin\views\field\LanguageField.

Class

LanguageField
Defines a field handler to translate a language into its readable form.

Namespace

Drupal\language\Plugin\views\field

Code

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 : '';
}