public function CiviCrmApi::getCount in CiviCRM Entity 8.3
Get the count of entries for an entity.
Parameters
string $entity: The entity name.
array $params: The array of field values.
Return value
int The number of entities.
Overrides CiviCrmApiInterface::getCount
File
- src/
CiviCrmApi.php, line 88
Class
- CiviCrmApi
- CiviCRM API implementation.
Namespace
Drupal\civicrm_entityCode
public function getCount($entity, array $params = []) {
$this
->initialize();
$result = civicrm_api3($entity, 'getcount', $params);
return is_int($result) ? $result : $result['result'];
}