You are here

function apachesolr_multilingual_fire_callbacks in Apache Solr Multilingual 6.3

1 call to apachesolr_multilingual_fire_callbacks()
apachesolr_multilingual_apachesolr_index_documents_alter in ./apachesolr_multilingual.module
Implements hook_apachesolr_index_documents_alter().

File

./apachesolr_multilingual.module, line 261
Multilingual search using Apache Solr.

Code

function apachesolr_multilingual_fire_callbacks($document, $entity, $entity_type, $callback_name, $env_id) {

  // See _apachesolr_index_process_entity_get_document().
  $bundle = $entity->type;

  //Get the callback array to add stuff to the document
  $document_callbacks = apachesolr_entity_get_callback($entity_type, $callback_name, $bundle);
  $tmp_documents = array();
  foreach ($document_callbacks as $document_callback) {

    // Call a type-specific callback to add stuff to the document.
    $tmp_documents = array_merge($tmp_documents, $document_callback($document, $entity, $entity_type, $env_id));

    // Generic use case for future reference. Callbacks can
    // allow you to send back multiple documents.
    // @see apachesolr_index_node_solr_document()
    // $tmp_documents is not in use yet.
  }
}