function facetapi_test_search_callback in Facet API 6.3
Same name and namespace in other branches
- 7.2 tests/facetapi_test.module \facetapi_test_search_callback()
- 7 tests/facetapi_test.module \facetapi_test_search_callback()
Fake search page callback.
1 string reference to 'facetapi_test_search_callback'
- facetapi_test_menu in tests/
facetapi_test/ facetapi_test.module - Implements hook_menu().
File
- tests/
facetapi_test/ facetapi_test.module, line 135 - Provides a test adapter and plugins.
Code
function facetapi_test_search_callback() {
$build = array();
if (!($adapter = facetapi_adapter_load('facetapi_test'))) {
throw new Exception(t('Error loading adapter.'));
}
$query = new stdClass();
$adapter
->addActiveFilters($query);
$keys = isset($_GET['keys']) ? $_GET['keys'] : arg(2);
$adapter
->setSearchKeys($keys);
$build['placeholder'] = array(
'#value' => t('Placeholder'),
);
return $build;
}