protected function SearchApiEtDatasourceController::getTrackableItemIdsFromMixedSource in Search API Entity Translation 7.2
Helper function to return the list of ItemIDs, fiven
Parameters
\SearchApiIndex $index:
$mixed_ids:
Return value
array
1 call to SearchApiEtDatasourceController::getTrackableItemIdsFromMixedSource()
- SearchApiEtDatasourceController::trackItemDelete in includes/
SearchApiEtDatasourceController.php - Stops tracking the index status for the given items on the given indexes.
File
- includes/
SearchApiEtDatasourceController.php, line 411 - Contains the SearchApiEtDatasourceController class.
Class
- SearchApiEtDatasourceController
- Provides multilingual versions of all entity types.
Code
protected function getTrackableItemIdsFromMixedSource(SearchApiIndex $index, $mixed_ids) {
// Check if we get Entity IDs or Item IDs.
$first_item_id = reset($mixed_ids);
$is_valid_item_id = SearchApiEtHelper::isValidItemId($first_item_id);
if (!$is_valid_item_id) {
$entity_id = $first_item_id;
$ids = $this
->getTrackableItemIds($index, $entity_id);
}
else {
// Filter the item_ids that need to be tracked by this index.
$ids = $this
->filterTrackableIds($index, $mixed_ids);
}
return $ids;
}