class DbToolsApplication

Same name and namespace in other branches
  1. 9 core/lib/Drupal/Core/Command/DbToolsApplication.php \Drupal\Core\Command\DbToolsApplication
  2. 8.9.x core/lib/Drupal/Core/Command/DbToolsApplication.php \Drupal\Core\Command\DbToolsApplication
  3. 11.x core/lib/Drupal/Core/Command/DbToolsApplication.php \Drupal\Core\Command\DbToolsApplication

Provides a command to import a database generation script.

Hierarchy

  • class \Drupal\Core\Command\DbToolsApplication implements \Symfony\Component\Console\Application

Expanded class hierarchy of DbToolsApplication

2 files declare their use of DbToolsApplication
db-tools.php in core/scripts/db-tools.php
A command line application to import a database generation script.
DbToolsApplicationTest.php in core/modules/system/tests/src/Kernel/Scripts/DbToolsApplicationTest.php

File

core/lib/Drupal/Core/Command/DbToolsApplication.php, line 10

Namespace

Drupal\Core\Command
View source
class DbToolsApplication extends Application {
  
  /**
   * {@inheritdoc}
   */
  public function __construct() {
    parent::__construct('Database Tools', \Drupal::VERSION);
  }
  
  /**
   * {@inheritdoc}
   */
  protected function getDefaultCommands() : array {
    $default_commands = parent::getDefaultCommands();
    $default_commands[] = new DbDumpCommand();
    $default_commands[] = new DbImportCommand();
    return $default_commands;
  }

}

Members

Title Sort descending Modifiers Object type Summary
DbToolsApplication::getDefaultCommands protected function
DbToolsApplication::__construct public function

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.