function GenerateTheme::initialize

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

File

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

Class

GenerateTheme
Generates a new theme based on latest default markup.

Namespace

Drupal\Core\Command

Code

protected function initialize(InputInterface $input, OutputInterface $output) : void {
    if ($input->getOption('name') === NULL) {
        $input->setOption('name', $input->getArgument('machine-name'));
    }
    // Change the directory to the Drupal root.
    chdir($this->root);
}

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