function ContextualLinks::pre_render

Run before any fields are rendered.

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

Parameters

$values: An array of all objects returned from the query.

Overrides FieldPluginBase::pre_render

File

drupal/core/modules/contextual/lib/Drupal/contextual/Plugin/views/field/ContextualLinks.php, line 54
Definition of Drupal\contextual\Plugin\views\field\ContextualLinks.

Class

ContextualLinks
Provides a handler that adds contextual links.

Namespace

Drupal\contextual\Plugin\views\field

Code

function pre_render(&$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;
  }
}