function monitoring_search_api_index_delete in Monitoring 8
File
- ./
monitoring.module, line 540 - Monitoring bootstrap file.
Code
function monitoring_search_api_index_delete(IndexInterface $index) {
// Don't do anything if we are syncing or if the sensor does not exists.
$config_id = 'search_api_' . $index
->id();
if ($index
->isSyncing() || !SensorConfig::load($config_id)) {
return;
}
$sensor = SensorConfig::load($config_id);
$sensor
->delete();
}