Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. GenerateTheme.php

function GenerateTheme::configure

Overrides Command::configure

File

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

Class

GenerateTheme
Generates a new theme based on latest default markup.

Namespace

Drupal\Core\Command

Code

protected function configure() : void {
    $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', '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');
}
RSS feed
Powered by Drupal