The deprecated $conditions
argument has been removed from entity_load_multiple()
and all wrapper functions like node_load_multiple()
.
As a replacement, a new helper function called entity_load_multiple_by_properties()
has been introduced. Additionally, loading a revision of an entity has been moved to a separate function called entity_revision_load()
, with a wrapper for nodes called node_revision_load()
.
To support these new functions, the EntityStorageControllerInterface
has been extended with two methods and $conditions
has been removed from the load()
method. In addition, $conditions
has been removed from the protected method buildQuery()
of the default database storage controller.
- EntityStorageControllerInterface::loadByProperties()
- EntityStorageControllerInterface::loadRevision()
- EntityStorageControllerInterface::load()
- DatabaseStorageController::buildQuery()
Storage controllers which implement or overwrite these methods need to be adapted.
7.x
// Load specific revision.
$node_revision = node_load($nid, $vid);
// Load all nodes with a specific title.
$nodes = node_load_multiple(FALSE, array('title' => 'The node title'));
8.x
// Load specific revision.
$node_revision = node_revision_load($vid);
// Load all nodes with a specific title.
$nodes = entity_load_multiple_by_properties('node', array('title' => 'The node title'));