Last active
September 27, 2015 06:08
-
-
Save bleeDev/1223270 to your computer and use it in GitHub Desktop.
Extending Facet API for Mime Type 1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function MYMODULE_facetapi_facet_info($searcher_info) { | |
$facets = array(); | |
$facets['mime'] = array( | |
'label' => t('Mime Type'), | |
'description' => t('Filter by mime type.'), | |
//indexed field from solr | |
'field' => 'ss_filemime', | |
'map callback' => 'MYMODULE_map_mime', | |
'facet mincount allowed' => TRUE, | |
'dependency plugins' => array('bundle', 'role'), | |
); | |
return $facets; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment