public function ContentTaxonomyAutocompleteModeratedTermsSearchAPIProcessor::preprocessIndexItems in Content Taxonomy 7
Postprocess items while indexing and filter out the moderated terms.
Overrides SearchApiAbstractProcessor::preprocessIndexItems
File
- includes/
content_taxonomy_autocomplete_moderated_terms.inc, line 22
Class
- ContentTaxonomyAutocompleteModeratedTermsSearchAPIProcessor
- Search API Processor that filters out terms from moderated vocabularies.
Code
public function preprocessIndexItems(array &$items) {
$fields = $this
->getTaxonomyFields($this->options['fields']);
foreach ($items as &$item) {
foreach ($fields as $search_api_property_name => $field) {
if (isset($item[$search_api_property_name])) {
$this
->processTaxonomyField($item[$search_api_property_name]['value'], $item[$search_api_property_name]['type'], $field);
}
}
}
}