function FieldPluginBase::get_value

Get the value that's supposed to be rendered.

This api exists so that other modules can easy set the values of the field without having the need to change the render method as well.

Parameters

$values: An object containing all retrieved values.

$field: Optional name of the field where the value is stored.

49 calls to FieldPluginBase::get_value()
Boolean::render in drupal/core/modules/views/lib/Drupal/views/Plugin/views/field/Boolean.php
Render the field.
BulkForm::views_form in drupal/core/modules/action/lib/Drupal/action/Plugin/views/field/BulkForm.php
Implements \Drupal\views\Plugin\views\Plugin\field\FieldPluginBase::views_form().
Comment::render in drupal/core/modules/comment/lib/Drupal/comment/Plugin/views/field/Comment.php
Render the field.
Comment::render_link in drupal/core/modules/comment/lib/Drupal/comment/Plugin/views/field/Comment.php
Date::render in drupal/core/modules/views/lib/Drupal/views/Plugin/views/field/Date.php
Render the field.

... See full list

1 method overrides FieldPluginBase::get_value()
Counter::get_value in drupal/core/modules/views/lib/Drupal/views/Plugin/views/field/Counter.php
Overrides Drupal\views\Plugin\views\field\FieldPluginBas::get_value()

File

drupal/core/modules/views/lib/Drupal/views/Plugin/views/field/FieldPluginBase.php, line 384
Definition of Drupal\views\Plugin\views\field\FieldPluginBase.

Class

FieldPluginBase
Base field handler that has no options and renders an unformatted field.

Namespace

Drupal\views\Plugin\views\field

Code

function get_value($values, $field = NULL) {
  $alias = isset($field) ? $this->aliases[$field] : $this->field_alias;
  if (isset($values->{$alias})) {
    return $values->{$alias};
  }
}