Problem/Motivation
On #2900409: [Meta] Improve UI of Reference field settings form, Berdir noticed that the code for that patch was very similar to the views_entity_field_label() function.
Rather than maintaining this code in two places, it would be better if it was moved to be a method on a class accessible as a service. Berdir suggested maybe putting on the EntityFieldManager class.
Proposed resolution
a) Figure out which class this belongs on.
b) Add the method to that class.
c) Make views_entity_field_label() call that method.
d) Deprecate views_entity_field_label() -- meaning adding @deprecated tag to the doc block, adding trigger_error to the code, and replacing calls to that function in core.
Once that is done, we can also use the new function on #2900409: [Meta] Improve UI of Reference field settings form (which will be taken care of on that issue, not here).
Remaining tasks
All of the above.
User interface changes
None.
API changes
function views_entity_field_label() will be deprecated in favor of a class method on a service (TBD).
Data model changes
None.
Release notes snippet
TBD (write this when the class method has been written)