public function SearchApiIndex::dataAlter in Search API 7
Calls data alteration hooks for a set of items, according to the index options.
Parameters
array $items: An array of items to be altered.
Return value
SearchApiIndex The called object.
1 call to SearchApiIndex::dataAlter()
- SearchApiIndex::index in includes/
index_entity.inc - Indexes items on this index.
File
- includes/
index_entity.inc, line 533 - Contains SearchApiIndex.
Class
- SearchApiIndex
- Class representing a search index.
Code
public function dataAlter(array &$items) {
// First, execute our own search_api_language data alteration.
foreach ($items as &$item) {
$item->search_api_language = isset($item->language) ? $item->language : LANGUAGE_NONE;
}
foreach ($this
->getAlterCallbacks() as $callback) {
$callback
->alterItems($items);
}
return $this;
}