function search_api_glossary_facet_strip_facet_count in Search API AZ Glossary 7
Facet API "alter callback".
Pads the glossary when there are no results displayed when the facet is rendered.
1 string reference to 'search_api_glossary_facet_strip_facet_count'
File
- ./
search_api_glossary.module, line 177 - Search api glossary module file.
Code
function search_api_glossary_facet_strip_facet_count(&$build, FacetapiAdapter $adapter, array $facet) {
$glossary_array = range('A', 'Z');
$glossary_array[] = "#";
$glossary_array[] = "0-9";
foreach ($glossary_array as $key) {
if (!array_key_exists($key, $build)) {
$build[$key]['#count'] = 0;
}
}
}