updated to 7.x-1.11
This commit is contained in:
@@ -22,7 +22,8 @@
|
||||
* - description: A translated string to be shown to administrators when
|
||||
* selecting a service class. Should contain all peculiarities of the
|
||||
* service class, like field type support, supported features (like facets),
|
||||
* the "direct" parse mode and other specific things to keep in mind.
|
||||
* the "direct" parse mode and other specific things to keep in mind. The
|
||||
* text can contain HTML.
|
||||
* - class: The service class, which has to implement the
|
||||
* SearchApiServiceInterface interface.
|
||||
*
|
||||
@@ -192,6 +193,8 @@ function hook_search_api_data_type_info_alter(array &$infos) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Define available data alterations.
|
||||
*
|
||||
* Registers one or more callbacks that can be called at index time to add
|
||||
* additional data to the indexed items (e.g. comments or attachments to nodes),
|
||||
* alter the data in other forms or remove items from the array.
|
||||
@@ -226,6 +229,21 @@ function hook_search_api_alter_callback_info() {
|
||||
return $callbacks;
|
||||
}
|
||||
|
||||
/**
|
||||
* Alter the available data alterations.
|
||||
*
|
||||
* @param array $callbacks
|
||||
* The callback information to be altered, keyed by callback IDs.
|
||||
*
|
||||
* @see hook_search_api_alter_callback_info()
|
||||
*/
|
||||
function hook_search_api_alter_callback_info_alter(array &$callbacks) {
|
||||
if (!empty($callbacks['example_random_alter'])) {
|
||||
$callbacks['example_random_alter']['name'] = t('Even more random alteration');
|
||||
$callbacks['example_random_alter']['class'] = 'ExampleUltraRandomAlter';
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Registers one or more processors. These are classes implementing the
|
||||
* SearchApiProcessorInterface interface which can be used at index and search
|
||||
@@ -261,6 +279,20 @@ function hook_search_api_processor_info() {
|
||||
return $callbacks;
|
||||
}
|
||||
|
||||
/**
|
||||
* Alter the available processors.
|
||||
*
|
||||
* @param array $processors
|
||||
* The processor information to be altered, keyed by processor IDs.
|
||||
*
|
||||
* @see hook_search_api_processor_info()
|
||||
*/
|
||||
function hook_search_api_processor_info_alter(array &$processors) {
|
||||
if (!empty($processors['example_processor'])) {
|
||||
$processors['example_processor']['weight'] = -20;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Allows you to log or alter the items that are indexed.
|
||||
*
|
||||
|
Reference in New Issue
Block a user