function Boolean::defineOptions

Overrides FieldPluginBase::defineOptions

File

core/modules/views/src/Plugin/views/field/Boolean.php, line 40

Class

Boolean
A handler to provide proper displays for booleans.

Namespace

Drupal\views\Plugin\views\field

Code

protected function defineOptions() {
  $options = parent::defineOptions();
  $options['type'] = [
    'default' => 'yes-no',
  ];
  $options['type_custom_true'] = [
    'default' => '',
  ];
  $options['type_custom_false'] = [
    'default' => '',
  ];
  $options['not'] = [
    'default' => FALSE,
  ];
  return $options;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.