function search_api_solr_uninstall in Search API Solr 4.x
Same name and namespace in other branches
- 8.3 search_api_solr.install \search_api_solr_uninstall()
- 8 search_api_solr.install \search_api_solr_uninstall()
- 8.2 search_api_solr.install \search_api_solr_uninstall()
- 7 search_api_solr.install \search_api_solr_uninstall()
Implements hook_uninstall().
Throws
\Drupal\Component\Plugin\Exception\InvalidPluginDefinitionException
\Drupal\Component\Plugin\Exception\PluginNotFoundException
\Drupal\search_api\SearchApiException
File
- ./
search_api_solr.install, line 225 - Install, update and uninstall functions for the Search API Solr module.
Code
function search_api_solr_uninstall() {
\Drupal::state()
->delete('search_api_solr.last_optimize');
\Drupal::state()
->delete('search_api_solr.endpoint.data');
\Drupal::state()
->delete('search_api_solr.site_hash');
\Drupal::state()
->delete('search_api_solr.search_all_rows');
foreach (search_api_solr_get_servers() as $server) {
foreach ($server
->getIndexes() as $index) {
\Drupal::state()
->delete('search_api_solr.' . $index
->id() . '.last_update');
}
\Drupal::state()
->delete('search_api_solr.' . $server
->id() . '.schema_parts');
}
}