function search_api_search_api_index_insert in Search API 8
Same name and namespace in other branches
- 7 search_api.module \search_api_search_api_index_insert()
Implements hook_ENTITY_TYPE_insert() for type "search_api_index".
Clears the Views row plugin cache, so our row plugin will become available for new indexes right away.
See also
search_api_views_plugins_row_alter()
File
- ./
search_api.module, line 359 - Provides a rich framework for creating searches.
Code
function search_api_search_api_index_insert(Index $index) {
if (\Drupal::hasService('plugin.manager.views.row')) {
\Drupal::getContainer()
->get('plugin.manager.views.row')
->clearCachedDefinitions();
}
}