Problem/Motivation

Currently the relationships always have a bundle / type restriction on the required context for the relationship.
This can limit the usage of the plugin as it avoids to use the same plugin for multiple bundles.
Even if this is a valid use case.

Proposed resolution

Please have a look at this: #2557835: Performance: replace field_read_instances() with field_info_instances()
This enhances the performance and adds bundle independent plugin definitions.

Provide a plugin definition that doesn't impose the bundle restriction on the requried context.
As we already check if the field is available on the entity nothing more is necessary.
If the entity doesn't have the field it simply returns an empty context.

Remaining tasks

Reviews needed.

User interface changes

None.

API changes

None.

Comments

das-peter’s picture

Issue summary: View changes

Please have a look at this: #2557835: Performance: replace field_read_instances() with field_info_instances()
This enhances the performance and adds bundle independent plugin definitions.