You are here

function hs_content_taxonomy_views_hierarchical_select_entity_count in Hierarchical Select 5.3

Implementation of hook_hierarchical_select_entity_count().

File

modules/hs_content_taxonomy_views.module, line 382
Implementation of the Hierarchical Select API for the Content Taxonomy Views module.

Code

function hs_content_taxonomy_views_hierarchical_select_entity_count($item, $params) {
  if ($item == '**ALL**') {

    // Unlike in the hs_taxonomy_views implementation, we can't use a simple
    // SQL query here, because no depth information is stored in the database.
    return count(_hs_taxonomy_hierarchical_select_get_tree($params['vid'], 0, -1, $params['depth']));
  }
  else {
    return hs_content_taxonomy_hierarchical_select_entity_count($item, $params);
  }
}