public function SelectForm::preRender in Entity Browser 8
Same name and namespace in other branches
- 8.2 src/Plugin/views/field/SelectForm.php \Drupal\entity_browser\Plugin\views\field\SelectForm::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
- src/
Plugin/ views/ field/ SelectForm.php, line 118
Class
- SelectForm
- Defines a bulk operation form element that works with entity browser.
Namespace
Drupal\entity_browser\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'] = '';
}
}