I'd like to implement an entity hook, and act on all fields defined by Computed Field FieldType plugins. So I either need a list of all FieldType plugins provided by the module or need to know which fields are associated with it in order to know which fields to work on (or avoid). Is this possible?
I'd rather not hard-code the list of plugins (computed_string
, computed_decimal
, etc.) because new ones could be added later, and then the list would have to change.
And I can't use computed_*
because another module, Computed Field Plugin, defines its own field type with that prefix, and I don't want to touch it.
I was expecting something like FieldDefinitionInterface::getDefiningModule()
, but that doesn't seem to exist.
For those interested, I'm working on adding support for computed cardinality.