Deprecate views_entity_field_label() in favor of a class method outside Views

Created on 22 July 2019, over 5 years ago
Updated 16 November 2024, 17 days ago

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)

πŸ“Œ Task
Status

Needs work

Version

11.0 πŸ”₯

Component
FieldΒ  β†’

Last updated 1 day ago

Created by

πŸ‡ΊπŸ‡ΈUnited States jhodgdon Spokane, WA, USA

Live updates comments and jobs are added and updated live.
  • Needs tests

    The change is currently missing an automated test that fails when run with the original code, and succeeds when the bug has been fixed.

Sign in to follow issues

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024