Is it possible to let a plugin depend on a module (other than the declaring one)?
Use case: I want to create a field widget plugin that should depend on the 'date_all_day' contrib module, but I don't want the entire declaring module depend on this.
Is it possible to declare this in the annotation?
E.g.
/**
* @FieldWidget(
* id = "my_daterange",
* label = @Translation("Date and time range + All day"),
* field_types = {"daterange"},
* dependencies = {"date_all_day"}
* )
*/
class MyPlugin {...}
The plugin should only become available if both the declaring module and the dependency module are enabled.