You are here

public static function EntityHelper::loadByCondition in Helper 7

File

lib/EntityHelper.php, line 47

Class

EntityHelper

Code

public static function loadByCondition($entity_type, array $conditions) {
  $entities = entity_load($entity_type, FALSE, $conditions);
  return reset($entities);
}