function BulkForm::preRender

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

Overrides FieldPluginBase::preRender

File

core/modules/views/src/Plugin/views/field/BulkForm.php, line 270

Class

BulkForm
Defines an actions-based bulk operation form element.

Namespace

Drupal\views\Plugin\views\field

Code

public function preRender(&$values) {
    parent::preRender($values);
    // If the view is using a table style, provide a placeholder for a
    // "select all" checkbox.
    if (!empty($this->view->style_plugin) && $this->view->style_plugin instanceof Table) {
        // Add the tableselect css classes.
        $this->options['element_label_class'] .= 'select-all';
        // Hide the actual label of the field on the table header.
        $this->options['label'] = '';
    }
}

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