function FieldPluginBase::getElements

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

Overrides FieldHandlerInterface::getElements

1 call to FieldPluginBase::getElements()
FieldPluginBase::buildOptionsForm in core/modules/views/src/Plugin/views/field/FieldPluginBase.php
Default option form that provides label widget that all fields should have.

File

core/modules/views/src/Plugin/views/field/FieldPluginBase.php, line 341

Class

FieldPluginBase
Base class for views fields.

Namespace

Drupal\views\Plugin\views\field

Code

public function getElements() {
    static $elements = NULL;
    if (!isset($elements)) {
        // @todo Add possible html5 elements.
        $elements = [
            '' => $this->t('- Use default -'),
            '0' => $this->t('- None -'),
        ];
        $elements += \Drupal::config('views.settings')->get('field_rewrite_elements');
    }
    return $elements;
}

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