use OptionsProviderInterface to get terms instead of looking at field settings

Created on 7 February 2024, 11 months ago

Problem/Motivation

The code in SearchInTextFields to get the possible terms for a term reference field checks the entity reference handler:

    // Term references can either use the "default" handler, which assigns a list
    // of vocabularies to reference or a "views" handler which uses Views to
    // make the list of terms. These need to be handled differently.

However, other handlers could exist!

And in both cases that are handled, the code is poking around in internals which is brittle.

Steps to reproduce

Proposed resolution

Use OptionsProviderInterface::getPossibleValues() to get the terms.

Remaining tasks

User interface changes

API changes

Data model changes

📌 Task
Status

Active

Version

1.0

Component

Code

Created by

🇬🇧United Kingdom joachim

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024