function lingotek_get_entity_count in Lingotek Translation 7.7
Same name and namespace in other branches
- 7.5 lingotek.util.inc \lingotek_get_entity_count()
- 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 2154 - 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;
}