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

Breadcrumb

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

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

API Navigation

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