function bat_facets_facetapi_facet_info in Booking and Availability Management Tools for Drupal 7
Implements hook_facetapi_facet_info().
File
- modules/
bat_facets/ bat_facets.facetapi.inc, line 11 - Bat Facet API definitions.
Code
function bat_facets_facetapi_facet_info(array $searcher_info) {
$facets = array();
// Facets are usually associated with the type of content stored in the index.
if (isset($searcher_info['types']['bat_type'])) {
$facets['bat_state'] = array(
'name' => 'bat_state',
'label' => t('Bat State'),
'description' => t('Bat Availability State facet'),
'field' => 'bat_state',
'field alias' => 'bat_state',
'field api name' => FALSE,
'field api bundles' => array(),
'query types' => array(
'term',
),
'dependency plugins' => array(
'role',
),
'default widget' => 'bat_state',
'allowed operators' => array(
FACETAPI_OPERATOR_AND => TRUE,
FACETAPI_OPERATOR_OR => FALSE,
),
'facet missing allowed' => FALSE,
'facet mincount allowed' => FALSE,
'weight' => 0,
'map callback' => FALSE,
'map options' => array(),
'hierarchy callback' => FALSE,
'values callback' => FALSE,
'min callback' => FALSE,
'max callback' => FALSE,
);
}
return $facets;
}