You are here

function civicrm_entity_query in CiviCRM Entity 7

Same name and namespace in other branches
  1. 7.2 civicrm_entity.module \civicrm_entity_query()
2 string references to 'civicrm_entity_query'
civicrm_entity_rules_action_info in ./civicrm_entity.rules.inc
Implements hook_rules_action_info().
civicrm_entity_rules_condition_info in ./civicrm_entity.rules.inc
Implements hook_rules_condition_info().

File

./civicrm_entity.module, line 781
Implement CiviCRM entities as a Drupal Entity.

Code

function civicrm_entity_query($type, $property, $value, $limit) {
  $return = entity_load($type, $ids = FALSE, array(
    $property => $value,
    'options' => array(
      'limit' => $limit,
    ),
  ));
  return array(
    'entity_fetched' => array_values($return),
  );
}