Would be great to get a function entity_uuid_load_single which works the same as entity_load_single

Comments

skwashd’s picture

@fox_01, I agree this would be a handy function. I've added it to my "when I get time" todo list. In the interim patches are welcome. Something like this should do the trick:

function entity_uuid_load_single($entity_type, $uuid) {
  $entity = entity_uuid_load($entity_type, $uuid);
  return reset($entity);
}

If someone is implementing this, it will need docs and tests.