public function BulkForm::buildOptionsForm

Overrides \Drupal\views\Plugin\views\field\FieldPluginBase::buildOptionsForm().

Overrides FieldPluginBase::buildOptionsForm

File

drupal/core/modules/action/lib/Drupal/action/Plugin/views/field/BulkForm.php, line 37
Contains \Drupal\action\Plugin\views\field\BulkForm.

Class

BulkForm
Defines a actions-based bulk operation form element.

Namespace

Drupal\action\Plugin\views\field

Code

public function buildOptionsForm(&$form, &$form_state) {
  parent::buildOptionsForm($form, $form_state);
  $form['include_exclude'] = array(
    '#type' => 'radios',
    '#title' => t('Available actions'),
    '#options' => array(
      'exclude' => t('All actions, except selected'),
      'include' => t('Only selected actions'),
    ),
    '#default_value' => $this->options['include_exclude'],
  );
  $form['selected_actions'] = array(
    '#type' => 'checkboxes',
    '#title' => t('Selected actions'),
    '#options' => $this
      ->getBulkOptions(FALSE),
    '#default_value' => $this->options['selected_actions'],
  );
}