This is a follow-up to #1763974: Convert entity type info into plugins

Currently, entity controller are a Drupalism and hard-wired with the entity info. This proposal is probably very crazy but I would like to suggest to convert those to use the Plugin API as well. This would work seemlessly through derivatives! Each controller plugin would attach itself to entity types through derivatives. So we would keep the info about which controller is resposible for a given entity type on the entity info itself. Through ->getDefinitions on the respective plugins we we would then look up the entity definitions and build derivatives for each entity type that wants to use our controller plugin. Discuss!

Comments

fubhy’s picture

Status: Active » Closed (won't fix)

I am closing this as 'won't fix'. A wise man once said: Drupal has a very strong "everything is a nail" tendency... and when we get a new screwdriver, suddenly everything is a screw, instead. :-)