function FieldPluginBase::getPreviousFieldLabels
Same name in other branches
- 9 core/modules/views/src/Plugin/views/field/FieldPluginBase.php \Drupal\views\Plugin\views\field\FieldPluginBase::getPreviousFieldLabels()
- 8.9.x core/modules/views/src/Plugin/views/field/FieldPluginBase.php \Drupal\views\Plugin\views\field\FieldPluginBase::getPreviousFieldLabels()
- 10 core/modules/views/src/Plugin/views/field/FieldPluginBase.php \Drupal\views\Plugin\views\field\FieldPluginBase::getPreviousFieldLabels()
Returns all field labels 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 core/
modules/ views/ src/ Plugin/ views/ field/ FieldPluginBase.php - Default option form that provides label widget that all fields should have.
- Links::buildOptionsForm in core/
modules/ views/ src/ Plugin/ views/ field/ Links.php
File
-
core/
modules/ views/ src/ Plugin/ views/ field/ FieldPluginBase.php, line 1150
Class
- FieldPluginBase
- Base class for views fields.
Namespace
Drupal\views\Plugin\views\fieldCode
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;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.