public function SearchApiBulkForm::preRender in Search API 8
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 BulkForm::preRender
File
- src/
Plugin/ views/ field/ SearchApiBulkForm.php, line 94
Class
- SearchApiBulkForm
- Defines an actions-based bulk operation form element.
Namespace
Drupal\search_api\Plugin\views\fieldCode
public function preRender(&$values) {
$this
->traitPreRender($values);
// If the view is using a table style, provide a placeholder for a "select
// all" checkbox.
if (($this->view->style_plugin ?? NULL) 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'] = '';
}
}