You are here

function search_api_get_alter_callbacks in Search API 7

Returns a list of all available data alter callbacks.

Return value

array An array of all available data alter callbacks, keyed by function name.

See also

hook_search_api_alter_callback_info()

2 calls to search_api_get_alter_callbacks()
SearchApiIndex::getAlterCallbacks in includes/index_entity.inc
Loads all enabled data alterations for this index in proper order.
search_api_admin_index_workflow in ./search_api.admin.inc

File

./search_api.module, line 2159
Provides a flexible framework for implementing search services.

Code

function search_api_get_alter_callbacks() {
  $callbacks =& drupal_static(__FUNCTION__);
  if (!isset($callbacks)) {
    $callbacks = module_invoke_all('search_api_alter_callback_info');

    // Fill optional settings with default values.
    foreach ($callbacks as $id => $callback) {
      $callbacks[$id] += array(
        'weight' => 0,
      );
    }

    // Invoke alter hook.
    drupal_alter('search_api_alter_callback_info', $callbacks);
  }
  return $callbacks;
}