You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The directory module currently uses FieldAPI extra fields (aka pseudofields) for various things that are output on Directory Channel nodes. This works by declaring items in hook_entity_extra_field_info() and then adding output to the render array in hook_ENTITY_TYPE_view().
This has some drawbacks - for one thing I think it's the cause of #358. It's also quite limited as while you can arrange pseudofields in the display output, there's no way of configuring them.
Using computed fields instead could be a cleaner and more modern way to add output to directory channel nodes. Fields are declared in an entity info hook, and then a field plugin produces the render output. Caching and use of lazy builders for output which is dynamic needs to be considered -- I don't know how the current pseudofields handle this.
The text was updated successfully, but these errors were encountered:
The directory module currently uses FieldAPI extra fields (aka pseudofields) for various things that are output on Directory Channel nodes. This works by declaring items in hook_entity_extra_field_info() and then adding output to the render array in hook_ENTITY_TYPE_view().
This has some drawbacks - for one thing I think it's the cause of #358. It's also quite limited as while you can arrange pseudofields in the display output, there's no way of configuring them.
Using computed fields instead could be a cleaner and more modern way to add output to directory channel nodes. Fields are declared in an entity info hook, and then a field plugin produces the render output. Caching and use of lazy builders for output which is dynamic needs to be considered -- I don't know how the current pseudofields handle this.
The text was updated successfully, but these errors were encountered: