You are here

protected function SearchApiAlgoliaBackend::alterAlgoliaObjects in Search API Algolia 2.0.x

Same name and namespace in other branches
  1. 8 src/Plugin/search_api/backend/SearchApiAlgoliaBackend.php \Drupal\search_api_algolia\Plugin\search_api\backend\SearchApiAlgoliaBackend::alterAlgoliaObjects()
  2. 3.0.x src/Plugin/search_api/backend/SearchApiAlgoliaBackend.php \Drupal\search_api_algolia\Plugin\search_api\backend\SearchApiAlgoliaBackend::alterAlgoliaObjects()

Applies custom modifications to indexed Algolia objects.

This method allows subclasses to easily apply custom changes before the objects are sent to Algolia.

Parameters

array $objects: An array of objects ready to be indexed, generated from $items array.

\Drupal\search_api\IndexInterface $index: The search index for which items are being indexed.

array $items: An array of items being indexed.

See also

hook_search_api_algolia_objects_alter()

1 call to SearchApiAlgoliaBackend::alterAlgoliaObjects()
SearchApiAlgoliaBackend::indexItems in src/Plugin/search_api/backend/SearchApiAlgoliaBackend.php

File

src/Plugin/search_api/backend/SearchApiAlgoliaBackend.php, line 365

Class

SearchApiAlgoliaBackend
Class SearchApiAlgoliaBackend.

Namespace

Drupal\search_api_algolia\Plugin\search_api\backend

Code

protected function alterAlgoliaObjects(array &$objects, IndexInterface $index, array $items) {
  $this
    ->getModuleHandler()
    ->alter('search_api_algolia_objects', $objects, $index, $items);
}