This function accepts $load_entities as argument so returning EntityNG now #1818560: Convert taxonomy entities to the new Entity Field API or just stdObject from db_select() fetch

Proposed
Clean-up usage of taxonomy_get_tree() to return array of stdObject and separate function to load entities based on result

Comments

pcambra’s picture

If we return stdclass instead of the entity, we need to change (at least) the entity reference plugin for them (TermSelection.php) that uses $term->id() for $term->tid

Berdir’s picture

We'd need to change a ton of things. For example, whenever you need the term name in the correct translation, you *need* the loaded term object and call label(). That's why the load_entities argument was introduced initially.

jibran’s picture

Title:Refactor taxonomy_get_tree() to properly work with EntityNG» Refactor TermStorage::loadTree() to properly work with EntityNG
Version:8.0.x-dev» 8.1.x-dev
Category:Bug report» Task
Issue summary:View changes
Status:Active» Postponed

taxonomy_get_tree() is TermStorage::loadTree() now. I think it is not a bug nothing is broken. It's an api change without BC break so I think we can move it to 8.1.x

jibran’s picture

Title:Refactor TermStorage::loadTree() to properly work with EntityNG» Refactor TermStorage::loadTree() to properly work with Entity

Next Generation of entities has arrived.