function facetapi_test_facetapi_facet_info in Facet API 7
Same name and namespace in other branches
- 6.3 tests/facetapi_test/facetapi_test.module \facetapi_test_facetapi_facet_info()
- 7.2 tests/facetapi_test.module \facetapi_test_facetapi_facet_info()
Implements hook_facetapi_facet_info().
File
- tests/
facetapi_test.module, line 102 - Provides a test adapter and plugins.
Code
function facetapi_test_facetapi_facet_info($searcher_info) {
$facets = array();
if ('test' == $searcher_info['type']) {
$facets['enabled'] = array(
'label' => t('Enabled facet'),
'description' => t('Facet that tests enabling.'),
'dependency plugins' => array(
'role',
),
);
$facets['disabled'] = array(
'label' => t('Disabled facet'),
'description' => t('Facet that tests disabling.'),
'dependency plugins' => array(
'role',
),
);
$facets['colon:test'] = array(
'label' => t('Colon test'),
'description' => t('Test facets names with colons.'),
'dependency plugins' => array(
'role',
),
);
$facets['defaults'] = array(
'label' => t('Default test'),
'description' => t('Tests query type and operator defaults stored in settings.'),
'dependency plugins' => array(
'role',
),
'query types' => array(
'nonterm',
),
'default widget' => 'nonterm',
'allowed operators' => array(
FACETAPI_OPERATOR_AND => FALSE,
FACETAPI_OPERATOR_OR => TRUE,
),
);
$facets['hierarchical'] = array(
'label' => t('Hierarchical test'),
'description' => t('Test hierarchical facets.'),
'dependency plugins' => array(
'role',
),
'hierarchy callback' => 'facetapi_test_process_hierarchy',
);
}
return $facets;
}