You are here

public function ContextualLinks::preRender in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/contextual/src/Plugin/views/field/ContextualLinks.php \Drupal\contextual\Plugin\views\field\ContextualLinks::preRender()

Runs before any fields are rendered.

This gives the handlers some time to set up before any handler has been rendered.

Parameters

\Drupal\views\ResultRow[] $values: An array of all ResultRow objects returned from the query.

Overrides FieldPluginBase::preRender

File

core/modules/contextual/src/Plugin/views/field/ContextualLinks.php, line 78
Contains \Drupal\contextual\Plugin\views\field\ContextualLinks.

Class

ContextualLinks
Provides a handler that adds contextual links.

Namespace

Drupal\contextual\Plugin\views\field

Code

public function preRender(&$values) {

  // Add a row plugin css class for the contextual link.
  $class = 'contextual-region';
  if (!empty($this->view->style_plugin->options['row_class'])) {
    $this->view->style_plugin->options['row_class'] .= " {$class}";
  }
  else {
    $this->view->style_plugin->options['row_class'] = $class;
  }
}