function GenerateTheme::configure

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

File

core/lib/Drupal/Core/Command/GenerateTheme.php, line 47

Class

GenerateTheme
Generates a new theme based on latest default markup.

Namespace

Drupal\Core\Command

Code

protected function configure() {
    $this->setName('generate-theme')
        ->setDescription('Generates a new theme based on latest default markup.')
        ->addArgument('machine-name', InputArgument::REQUIRED, 'The machine name of the generated theme')
        ->addOption('name', NULL, InputOption::VALUE_OPTIONAL, 'A name for the theme.')
        ->addOption('description', NULL, InputOption::VALUE_OPTIONAL, 'A description of your theme.')
        ->addOption('path', NULL, InputOption::VALUE_OPTIONAL, 'The path where your theme will be created. Defaults to: themes')
        ->addOption('starterkit', NULL, InputOption::VALUE_OPTIONAL, 'The theme to use as the starterkit', 'starterkit_theme')
        ->addUsage('custom_theme --name "Custom Theme" --description "Custom theme generated from a starterkit theme" --path themes')
        ->addUsage('custom_theme --name "Custom Theme" --starterkit mystarterkit');
}

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