public function FieldPluginBase::getValue

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.

47 calls to FieldPluginBase::getValue()
Boolean::render in drupal/core/modules/views/lib/Drupal/views/Plugin/views/field/Boolean.php
Render the field.
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.
Depth::render in drupal/core/modules/comment/lib/Drupal/comment/Plugin/views/field/Depth.php
Work out the depth of this comment

... See full list

1 method overrides FieldPluginBase::getValue()
Counter::getValue in drupal/core/modules/views/lib/Drupal/views/Plugin/views/field/Counter.php
Get the value that's supposed to be rendered.

File

drupal/core/modules/views/lib/Drupal/views/Plugin/views/field/FieldPluginBase.php, line 391
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

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