function ContextualLinks::preRender

Same name in other branches
  1. 9 core/modules/contextual/src/Plugin/views/field/ContextualLinks.php \Drupal\contextual\Plugin\views\field\ContextualLinks::preRender()
  2. 8.9.x core/modules/contextual/src/Plugin/views/field/ContextualLinks.php \Drupal\contextual\Plugin\views\field\ContextualLinks::preRender()
  3. 11.x core/modules/contextual/src/Plugin/views/field/ContextualLinks.php \Drupal\contextual\Plugin\views\field\ContextualLinks::preRender()

Overrides FieldPluginBase::preRender

File

core/modules/contextual/src/Plugin/views/field/ContextualLinks.php, line 73

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

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