function EntityReference::preRender

Same name and namespace in other branches
  1. 9 core/modules/views/src/Plugin/views/row/EntityReference.php \Drupal\views\Plugin\views\row\EntityReference::preRender()
  2. 8.9.x core/modules/views/src/Plugin/views/row/EntityReference.php \Drupal\views\Plugin\views\row\EntityReference::preRender()
  3. 11.x core/modules/views/src/Plugin/views/row/EntityReference.php \Drupal\views\Plugin\views\row\EntityReference::preRender()

Allow the style to do stuff before each row is rendered.

Parameters

$result: The full array of results from the query.

Overrides RowPluginBase::preRender

File

core/modules/views/src/Plugin/views/row/EntityReference.php, line 47

Class

EntityReference
EntityReference row plugin.

Namespace

Drupal\views\Plugin\views\row

Code

public function preRender($row) {
  // Force all fields to be inline by default.
  if (empty($this->options['inline'])) {
    $fields = $this->view
      ->getHandlers('field', $this->displayHandler->display['id']);
    $names = array_keys($fields);
    $this->options['inline'] = array_combine($names, $names);
  }
  return parent::preRender($row);
}

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