Closed sammarks closed 10 years ago
This function will have the following definition:
Entity::map(string $entity_type, array $entity_ids);
It will load all the entities given in the $entity_ids array, and return an array of the loaded entities. This is meant to shorten code like this:
$entity_ids
$nids = $query->execute()->fetchCol(); $nodes = array(); foreach ($nids as $nid) { $nodes[] = AbleCore\Node::load($nid); }
Into code like this:
$nodes = AbleCore\Entity::map('node', $query->execute()->fetchCol();
This function will have the following definition:
It will load all the entities given in the
$entity_ids
array, and return an array of the loaded entities. This is meant to shorten code like this:Into code like this: