You are here

public function TweetFeedCommands::kill in Tweet Feed 8.3

Same name and namespace in other branches
  1. 4.x src/Commands/TweetFeedCommands.php \Drupal\tweet_feed\Commands\TweetFeedCommands::kill()

Delete everthing (remove before prod)

@usage tweet_feed:kill Kill the data with fire.

@command tweet_feed:kill @aliases tfk

File

src/Commands/TweetFeedCommands.php, line 40

Class

TweetFeedCommands
A Drush commandfile.

Namespace

Drupal\tweet_feed\Commands

Code

public function kill() {
  $this->db
    ->truncate('tweet_entity')
    ->execute();
  $this->db
    ->truncate('tweet_entity__hashtags')
    ->execute();
  $this->db
    ->truncate('tweet_entity__linked_images')
    ->execute();
  $this->db
    ->truncate('tweet_entity__user_mentions')
    ->execute();
  $this->db
    ->truncate('tweet_entity__user_mentions_tags')
    ->execute();
  $this->db
    ->truncate('twitter_profiles')
    ->execute();
}