You are here

public function SearchApiAlterCallbackInterface::alterItems in Search API 7

Alter items before indexing.

Items which are removed from the array won't be indexed, but will be marked as clean for future indexing. This could for instance be used to implement some sort of access filter for security purposes (e.g., don't index unpublished nodes or comments).

Parameters

array $items: An array of items to be altered, keyed by item IDs.

12 methods override SearchApiAlterCallbackInterface::alterItems()
SearchApiAlterAddAggregation::alterItems in includes/callback_add_aggregation.inc
Alter items before indexing.
SearchApiAlterAddHierarchy::alterItems in includes/callback_add_hierarchy.inc
Alter items before indexing.
SearchApiAlterAddUrl::alterItems in includes/callback_add_url.inc
Alter items before indexing.
SearchApiAlterAddUserContent::alterItems in includes/callback_user_content.inc
Alter items before indexing.
SearchApiAlterAddViewedEntity::alterItems in includes/callback_add_viewed_entity.inc
Alter items before indexing.

... See full list

File

includes/callback.inc, line 93
Contains base definitions for data alterations.

Class

SearchApiAlterCallbackInterface
Interface representing a Search API data-alter callback.

Code

public function alterItems(array &$items);