function views_entity_field_label
Same name and namespace in other branches
- 9 core/modules/views/views.views.inc \views_entity_field_label()
- 10 core/modules/views/views.views.inc \views_entity_field_label()
- 8.9.x 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
File
-
core/
modules/ views/ views.module, line 475
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.