function StylePluginBase::getFieldValue

Same name in other branches
  1. 9 core/modules/views/src/Plugin/views/style/StylePluginBase.php \Drupal\views\Plugin\views\style\StylePluginBase::getFieldValue()
  2. 8.9.x core/modules/views/src/Plugin/views/style/StylePluginBase.php \Drupal\views\Plugin\views\style\StylePluginBase::getFieldValue()
  3. 10 core/modules/views/src/Plugin/views/style/StylePluginBase.php \Drupal\views\Plugin\views\style\StylePluginBase::getFieldValue()

Get the raw field value.

Parameters

$index: The index count of the row.

$field: The id of the field.

1 call to StylePluginBase::getFieldValue()
StylePluginBase::renderGrouping in core/modules/views/src/Plugin/views/style/StylePluginBase.php
Group records as needed for rendering.

File

core/modules/views/src/Plugin/views/style/StylePluginBase.php, line 803

Class

StylePluginBase
Base class for views style plugins.

Namespace

Drupal\views\Plugin\views\style

Code

public function getFieldValue($index, $field) {
    $this->view->row_index = $index;
    $value = $this->view->field[$field]
        ->getValue($this->view->result[$index]);
    unset($this->view->row_index);
    return $value;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.