- π¬π§United Kingdom joachim
Rebased branches, and made a new MR for 9.5.x.
Not had time to consider the architectural questions raised by Berdir :(
I wonder if plugin decoration would be a way to do this: #2958184: Allow decoration of plugins β .
Or we just specify a handler class name?
- First commit to issue fork.
- π©πͺGermany geek-merlin Freiburg, Germany
Amazing! Hiding patches iFo the MR.
- π¬π§United Kingdom joachim
I've just realised this is closely linked to hook_field_views_data_views_data_alter()
The docs for that say:
> The Views module's implementation of hook_views_data_alter() invokes this for each field storage, in the module that defines the field type. It is not invoked in other modules.
So it's basically: the module defining the field type gets to say something about Views data. That hook is still needed, because it allows field type providers to do things like reverse entity references.
But as a follow-up we could move that hook to the new handler classes that this issue will introduce.
- π¬π§United Kingdom joachim
I'm removing commit e7790601 because it's making lots of unrelated changes, which is making the branch harder to rebase.
- πΊπΈUnited States nicxvan
Can we clean up the unused MRs?
Also does this have to be annotations still? If the approach with a new plugin type is used, then this definitely needs an attribute, and probably should replace the annotation.
Though I think @berdir suggested in #102/MR review that tagged services might be a better way to go than plugins?
- π¨πSwitzerland berdir Switzerland
This is going to be a pretty painful rebase now that views.views.inc is gone, but yes, since it is now in a service, I think it would make a lot of sense to make that essentially a tagged service and then we can just inject the handlers into that. I have this open and plan to see if I can make that work.
- π¬π§United Kingdom joachim
How would a tagged service work?
> Which is where things start to get interesting. This currently only has access to its own definition. but that callback is called on the whole definition and is capable of implementing back-references (see file_field_views_data_views_data_alter() for example and core_field_views_data() for term entity reference fields.
This precise point has come up at β¨ provide Views reverse relationships automatically for entity base fields Needs review -- handler classes for field type views data need to have one method for the field table, and another, optional one, to allow adding to the whole of the Views data.