Problem/Motivation
One thing from BCVB might be useful, which is the runtime applies() method.
To implement this, we'll need to record multiple possible EntityView attributes that can apply to a type/bundle/view-mode combination. Apply some kind of ordering, then if a this runtime logic doesnt apply, then we can go to the next registered entityview attribute for a combination.
Proposed resolution
PHP 8.5 introduced the possibility to add static closures in an attribute, I think this would be the best way forward to replicate the `applies` method, without introducing an interface or other complex infrastructure.
Comments