function hook_search_api_field_type_mapping_alter in Search API 8
Alter the mapping of Drupal data types to Search API data types.
Parameters
array $mapping: An array mapping all known (and supported) Drupal data types to their corresponding Search API data types. A value of FALSE means that fields of that type should be ignored by the Search API.
Deprecated
in search_api:8.x-1.14 and is removed from search_api:2.0.0. Please use the "search_api.mapping_field_types" event instead.
See also
https://www.drupal.org/node/3059866
\Drupal\search_api\Utility\DataTypeHelperInterface::getFieldTypeMapping()
1 function implements hook_search_api_field_type_mapping_alter()
Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.
- search_api_test_hooks_search_api_field_type_mapping_alter in tests/
search_api_test_hooks/ search_api_test_hooks.search_api.inc - Implements hook_search_api_field_type_mapping_alter().
File
- ./
search_api.api.php, line 189 - Hooks provided by the Search API module.
Code
function hook_search_api_field_type_mapping_alter(array &$mapping) {
$mapping['duration_iso8601'] = FALSE;
$mapping['my_new_type'] = 'string';
}