function Boolean::defineOptions

Same name in other branches
  1. 9 core/modules/views/src/Plugin/views/field/Boolean.php \Drupal\views\Plugin\views\field\Boolean::defineOptions()
  2. 10 core/modules/views/src/Plugin/views/field/Boolean.php \Drupal\views\Plugin\views\field\Boolean::defineOptions()
  3. 11.x core/modules/views/src/Plugin/views/field/Boolean.php \Drupal\views\Plugin\views\field\Boolean::defineOptions()

Overrides FieldPluginBase::defineOptions

File

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

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.