You are here

public function StylePluginBase::getField in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 core/modules/views/src/Plugin/views/style/StylePluginBase.php \Drupal\views\Plugin\views\style\StylePluginBase::getField()

Gets a rendered field.

Parameters

int $index: The index count of the row.

string $field: The ID of the field.

Return value

\Drupal\Component\Render\MarkupInterface|null The output of the field, or NULL if it was empty.

1 call to StylePluginBase::getField()
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 761
Contains \Drupal\views\Plugin\views\style\StylePluginBase.

Class

StylePluginBase
Base class for views style plugins.

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];
  }
}