public function BulkForm::buildOptionsForm in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/system/src/Plugin/views/field/BulkForm.php \Drupal\system\Plugin\views\field\BulkForm::buildOptionsForm()
Default options form that provides the label widget that all fields should have.
Overrides FieldPluginBase::buildOptionsForm
File
- core/
modules/ system/ src/ Plugin/ views/ field/ BulkForm.php, line 183 - Contains \Drupal\system\Plugin\views\field\BulkForm.
Class
- BulkForm
- Defines a actions-based bulk operation form element.
Namespace
Drupal\system\Plugin\views\fieldCode
public function buildOptionsForm(&$form, FormStateInterface $form_state) {
$form['action_title'] = array(
'#type' => 'textfield',
'#title' => $this
->t('Action title'),
'#default_value' => $this->options['action_title'],
'#description' => $this
->t('The title shown above the actions dropdown.'),
);
$form['include_exclude'] = array(
'#type' => 'radios',
'#title' => $this
->t('Available actions'),
'#options' => array(
'exclude' => $this
->t('All actions, except selected'),
'include' => $this
->t('Only selected actions'),
),
'#default_value' => $this->options['include_exclude'],
);
$form['selected_actions'] = array(
'#type' => 'checkboxes',
'#title' => $this
->t('Selected actions'),
'#options' => $this
->getBulkOptions(FALSE),
'#default_value' => $this->options['selected_actions'],
);
parent::buildOptionsForm($form, $form_state);
}