You are here

class MongoDbStorageCommands in MongoDB 8.2

Drush 9 commands service for the mongodb_watchdog module.

Hierarchy

Expanded class hierarchy of MongoDbStorageCommands

1 string reference to 'MongoDbStorageCommands'
drush.services.yml in modules/mongodb_storage/drush.services.yml
modules/mongodb_storage/drush.services.yml
1 service uses MongoDbStorageCommands
drupal.mongodb_storage.commands in modules/mongodb_storage/drush.services.yml
Drupal\mongodb_storage\Commands\MongoDbStorageCommands

File

modules/mongodb_storage/src/Commands/MongoDbStorageCommands.php, line 13

Namespace

Drupal\mongodb_storage\Commands
View source
class MongoDbStorageCommands extends DrushCommands {

  /**
   * The mongodb.watchdog.sanity_check service.
   *
   * @var \Drupal\mongodb_storage\Install\SqlImport
   */
  protected $sqlImport;

  /**
   * MongodbWatchdogCommands constructor.
   *
   * @param \Drupal\mongodb_storage\Install\SqlImport $sqlImport
   *   The mongodb.storage.sql_import service.
   */
  public function __construct(SqlImport $sqlImport) {
    $this->sqlImport = $sqlImport;
  }

  /**
   * Import the database KeyValue contents from default keys to MongoDB.
   *
   * @usage mongodb:storage:import_keyvalue
   *   Import the database KeyValue contents from default keys to MongoDB.
   *
   * @command mongodb:storage:import_keyvalue
   * @aliases mdbsikv,most-ikv
   */
  public function import() {
    $this->sqlImport
      ->import();
  }

}

Members

Namesort descending Modifiers Type Description Overrides
MongoDbStorageCommands::$sqlImport protected property The mongodb.watchdog.sanity_check service.
MongoDbStorageCommands::import public function Import the database KeyValue contents from default keys to MongoDB.
MongoDbStorageCommands::__construct public function MongodbWatchdogCommands constructor.