public function FieldPluginBase::getElements

Provide a list of elements valid for field HTML.

This function can be overridden by fields that want more or fewer elements available, though this seems like it would be an incredibly rare occurence.

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

File

drupal/core/modules/views/lib/Drupal/views/Plugin/views/field/FieldPluginBase.php, line 273
Definition of Drupal\views\Plugin\views\field\FieldPluginBase.

Class

FieldPluginBase
Base field handler that has no options and renders an unformatted field.

Namespace

Drupal\views\Plugin\views\field

Code

public function getElements() {
  static $elements = NULL;
  if (!isset($elements)) {

    // @todo Add possible html5 elements.
    $elements = array(
      '' => t(' - Use default -'),
      '0' => t('- None -'),
    );
    $elements += config('views.settings')
      ->get('field_rewrite_elements');
  }
  return $elements;
}