public function ViewsBootstrapTable::buildOptionsForm in Views Bootstrap 8.4
Same name and namespace in other branches
- 8.3 src/Plugin/views/style/ViewsBootstrapTable.php \Drupal\views_bootstrap\Plugin\views\style\ViewsBootstrapTable::buildOptionsForm()
Render the given style.
Overrides Table::buildOptionsForm
File
- src/
Plugin/ views/ style/ ViewsBootstrapTable.php, line 38
Class
- ViewsBootstrapTable
- Style plugin to render each item as a row in a Bootstrap table.
Namespace
Drupal\views_bootstrap\Plugin\views\styleCode
public function buildOptionsForm(&$form, FormStateInterface $form_state) {
parent::buildOptionsForm($form, $form_state);
$form['responsive'] = [
'#type' => 'checkbox',
'#title' => $this
->t('Responsive'),
'#default_value' => $this->options['responsive'],
'#description' => $this
->t('To make a table scroll horizontally on small devices.'),
];
$form['bootstrap_styles'] = [
'#title' => $this
->t('Bootstrap styles'),
'#type' => 'checkboxes',
'#default_value' => $this->options['bootstrap_styles'],
'#options' => [
'striped' => $this
->t('Striped'),
'bordered' => $this
->t('Bordered'),
'hover' => $this
->t('Hover'),
'condensed' => $this
->t('Condensed'),
],
];
}