You are here

function FieldPluginBase::get_elements in Views (for Drupal 7) 8.3

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::get_elements()
FieldPluginBase::buildOptionsForm in lib/Drupal/views/Plugin/views/field/FieldPluginBase.php
Default options form that provides the label widget that all fields should have.

File

lib/Drupal/views/Plugin/views/field/FieldPluginBase.php, line 269
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

function get_elements() {
  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;
}