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. 10 core/modules/views/src/Plugin/views/field/FieldPluginBase.php \Drupal\views\Plugin\views\field\FieldPluginBase::getElements()
  3. 11.x 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 options form that provides the label widget that all fields should have.

File

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

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.