function views_entity_field_label
Same name in this branch
- 11.x core/modules/views/views.views.inc \views_entity_field_label()
Same name in other branches
- 9 core/modules/views/views.views.inc \views_entity_field_label()
- 8.9.x core/modules/views/views.views.inc \views_entity_field_label()
- 10 core/modules/views/views.views.inc \views_entity_field_label()
Returns the label of a certain field.
Therefore it looks up in all bundles to find the most used field.
Deprecated
in drupal:11.2.0 and is removed from drupal:12.0.0. Use \Drupal::service('entity_field.manager')->getFieldLabels() instead.
See also
https://www.drupal.org/node/3489411
3 calls to views_entity_field_label()
- file_field_views_data_views_data_alter in core/
modules/ file/ file.views.inc - Implements hook_field_views_data_views_data_alter().
- image_field_views_data_views_data_alter in core/
modules/ image/ image.views.inc - Implements hook_field_views_data_views_data_alter().
- views_field_default_views_data in core/
modules/ views/ views.views.inc - Default views data implementation for a field.
File
-
core/
modules/ views/ views.module, line 510
Code
function views_entity_field_label($entity_type, $field_name) {
@trigger_error("views_entity_field_label() is deprecated in drupal:11.2.0 and is removed from drupal:12.0.0. Use \\Drupal::service('entity_field.manager')->getFieldLabels(). See https://www.drupal.org/node/3489411", E_USER_DEPRECATED);
return \Drupal::service('entity_field.manager')->getFieldLabels($entity_type, $field_name);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.