EFQ Rules

Component ID

2074741

Component name

EFQ Rules

Component type

module

Maintenance status

Development status

Component security advisory coverage

not-covered

Downloads

265

Component created

Component changed

Component body

EFQ Rules exposes Drupal EFQ API to rules, So entities can be queried and fetched based on multiple fields, properties and conditions.

TO use it the rules patch from #2103079: Allow providing Rules metadata assertions for lists of entities is needed.

There is a tutorial on how to use EFQ here, And this is the API documentation.

Almost all available methods from EFQ's interface are available, and a new data type for creating new instances of EFQ itself is introduced. There are still limitations which hopefully we'll get over soon, such as you can not still pass arrays of values.
Also for now only entity ID's are returned by the final query, And not the entity type or revision ID's. now entities can be fetched by EFQ.

A similar approach is Views Rules where entities from a view can be loaded and looped (and the view is configurable, good!).
Views rules fetches the entity where EFQ returns entity ids only and they should be loaded later. this is fixed now and entities are lazy loaded.

Contributions are very welcome.