public function StylePluginBase::getField

Gets a rendered field.

Parameters

int $index: The index count of the row.

string $field: The ID of the field.

Return value

string|null The output of the field, or NULL if it was empty.

1 call to StylePluginBase::getField()
StylePluginBase::renderGrouping in drupal/core/modules/views/lib/Drupal/views/Plugin/views/style/StylePluginBase.php
Group records as needed for rendering.

File

drupal/core/modules/views/lib/Drupal/views/Plugin/views/style/StylePluginBase.php, line 659
Definition of Drupal\views\Plugin\views\style\StylePluginBase.

Class

StylePluginBase
Base class to define a style plugin handler.

Namespace

Drupal\views\Plugin\views\style

Code

public function getField($index, $field) {
  if (!isset($this->rendered_fields)) {
    $this
      ->renderFields($this->view->result);
  }
  if (isset($this->rendered_fields[$index][$field])) {
    return $this->rendered_fields[$index][$field];
  }
}