You are here

class SearchIndexWipeCommands in Search Index Wipe 8

Class SearchIndexWipeCommands.

@package Drupal\searchindex_wipe\Commands

Hierarchy

Expanded class hierarchy of SearchIndexWipeCommands

1 string reference to 'SearchIndexWipeCommands'
drush.services.yml in ./drush.services.yml
drush.services.yml
1 service uses SearchIndexWipeCommands
searchindex_wipe.commands in ./drush.services.yml
\Drupal\searchindex_wipe\Commands\SearchIndexWipeCommands

File

src/Commands/SearchIndexWipeCommands.php, line 13

Namespace

Drupal\searchindex_wipe\Commands
View 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

Namesort descending Modifiers Type Description Overrides
SearchIndexWipeCommands::wipe public function Wipes Search module generated index.