function QuickStartCommand::configure

Same name in other branches
  1. 9 core/lib/Drupal/Core/Command/QuickStartCommand.php \Drupal\Core\Command\QuickStartCommand::configure()
  2. 10 core/lib/Drupal/Core/Command/QuickStartCommand.php \Drupal\Core\Command\QuickStartCommand::configure()
  3. 11.x core/lib/Drupal/Core/Command/QuickStartCommand.php \Drupal\Core\Command\QuickStartCommand::configure()

File

core/lib/Drupal/Core/Command/QuickStartCommand.php, line 28

Class

QuickStartCommand
Installs a Drupal site and starts a webserver for local testing/development.

Namespace

Drupal\Core\Command

Code

protected function configure() {
    $this->setName('quick-start')
        ->setDescription('Installs a Drupal site and runs a web server. This is not meant for production and might be too simple for custom development. It is a quick and easy way to get Drupal running.')
        ->addArgument('install-profile', InputArgument::OPTIONAL, 'Install profile to install the site in.')
        ->addOption('langcode', NULL, InputOption::VALUE_OPTIONAL, 'The language to install the site in. Defaults to en.', 'en')
        ->addOption('site-name', NULL, InputOption::VALUE_OPTIONAL, 'Set the site name. Defaults to Drupal.', 'Drupal')
        ->addOption('host', NULL, InputOption::VALUE_OPTIONAL, 'Provide a host for the server to run on. Defaults to 127.0.0.1.', '127.0.0.1')
        ->addOption('port', NULL, InputOption::VALUE_OPTIONAL, 'Provide a port for the server to run on. Will be determined automatically if none supplied.')
        ->addOption('suppress-login', 's', InputOption::VALUE_NONE, 'Disable opening a login URL in a browser.')
        ->addUsage('demo_umami --langcode fr')
        ->addUsage('standard --site-name QuickInstall --host localhost --port 8080')
        ->addUsage('minimal --host my-site.com --port 80');
    parent::configure();
}

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