You are here

function lingotek_get_entity_count in Lingotek Translation 7.5

Same name and namespace in other branches
  1. 7.7 lingotek.util.inc \lingotek_get_entity_count()
  2. 7.6 lingotek.util.inc \lingotek_get_entity_count()

Return the number of entities

Parameters

$entity_type: a string containing the name of the given entity type

File

./lingotek.util.inc, line 1427
Utility functions.

Code

function lingotek_get_entity_count($entity_type) {
  $query = db_select('{' . $entity_type . '}', 'n')
    ->fields('n')
    ->execute();
  $num_results = $query
    ->rowCount();
  return $num_results;
}