function hook_search_api_processor_info in Search API 7
Registers one or more processors. These are classes implementing the SearchApiProcessorInterface interface which can be used at index and search time to pre-process item data or the search query, and at search time to post-process the returned search results.
Return value
array An associative array keyed by the processor id and containing arrays with the following keys:
- name: The name to display for this processor.
- description: A short description of what the processor does at each phase.
- class: The processor class, which has to implement the SearchApiProcessorInterface interface.
- weight: (optional) Defines the order in which processors are displayed (and, therefore, invoked) by default. Defaults to 0.
See also
1 function implements hook_search_api_processor_info()
Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.
- search_api_search_api_processor_info in ./
search_api.module - Implements hook_search_api_processor_info().
1 invocation of hook_search_api_processor_info()
- search_api_get_processors in ./
search_api.module - Returns a list of all available pre- and post-processors.
File
- ./
search_api.api.php, line 266 - Hooks provided by the Search API module.
Code
function hook_search_api_processor_info() {
$callbacks['example_processor'] = array(
'name' => t('Example processor'),
'description' => t('Pre- and post-processes data in really cool ways.'),
'class' => 'ExampleSearchApiProcessor',
'weight' => -1,
);
$callbacks['example_processor_minimal'] = array(
'name' => t('Example processor 2'),
'description' => t('Processor with minimal description.'),
'class' => 'ExampleSearchApiProcessor2',
);
return $callbacks;
}