protected function FieldPluginBase::getPreviousFieldLabels

Returns all field lables of fields before this field.

Return value

array An array of field labels keyed by their field IDs.

2 calls to FieldPluginBase::getPreviousFieldLabels()
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.
Links::buildOptionsForm in drupal/core/modules/views/lib/Drupal/views/Plugin/views/field/Links.php
Overrides \Drupal\views\Plugin\views\field\FieldPluginBase::defineOptions().

File

drupal/core/modules/views/lib/Drupal/views/Plugin/views/field/FieldPluginBase.php, line 1071
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

protected function getPreviousFieldLabels() {
  $all_fields = $this->view->display_handler
    ->getFieldLabels();
  $field_options = array_slice($all_fields, 0, array_search($this->options['id'], array_keys($all_fields)));
  return $field_options;
}