Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. Boolean.php

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;
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal