public function BulkForm::preRender in Drupal 9
Same name and namespace in other branches
- 8 core/modules/views/src/Plugin/views/field/BulkForm.php \Drupal\views\Plugin\views\field\BulkForm::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/ views/ src/ Plugin/ views/ field/ BulkForm.php, line 249
Class
- BulkForm
- Defines an actions-based bulk operation form element.
Namespace
Drupal\views\Plugin\views\fieldCode
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'] = '';
}
}