class SearchIndexWipeCommands in Search Index Wipe 8
Class SearchIndexWipeCommands.
@package Drupal\searchindex_wipe\Commands
Hierarchy
- class \Drupal\searchindex_wipe\Commands\SearchIndexWipeCommands extends \Drush\Commands\DrushCommands
Expanded class hierarchy of SearchIndexWipeCommands
1 string reference to 'SearchIndexWipeCommands'
1 service uses SearchIndexWipeCommands
File
- src/
Commands/ SearchIndexWipeCommands.php, line 13
Namespace
Drupal\searchindex_wipe\CommandsView source
class SearchIndexWipeCommands extends DrushCommands {
/**
* Wipes Search module generated index.
*
* @command searchindex-wipe
* @aliases siw
* @usage drush9_example:hello akanksha --msg
* Truncates search index tables.
*/
public function wipe() {
if ($this
->io()
->confirm(dt('Are you sure you want to clear Search index?'))) {
searchindex_wipe_truncate_table();
}
else {
throw new UserAbortException();
}
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
SearchIndexWipeCommands:: |
public | function | Wipes Search module generated index. |