Back to ExtensionInstallCommand class

Method configure

protected void
configure
()
Initialise the command.
Returns
  • void
Since
  • 4.0.0

Method configure - Source code

/**
 * Initialise the command.
 *
 * @return  void
 *
 * @since   4.0.0
 */
protected function configure() : void
{
    $this->addOption('path', null, InputOption::VALUE_REQUIRED, 'The path to the extension');
    $this->addOption('url', null, InputOption::VALUE_REQUIRED, 'The url to the extension');
    $help = "<info>%command.name%</info> is used to install extensions\n\t\t\nYou must provide one of the following options to the command:\n\t\t\n  --path: The path on your local filesystem to the install package\n\t\t\n  --url: The URL from where the install package should be downloaded\n\t\t\nUsage:\n\t\t\n  <info>php %command.full_name% --path=<path_to_file></info>\n\t\t\n  <info>php %command.full_name% --url=<url_to_file></info>";
    $this->setDescription('Install an extension from a URL or from a path');
    $this->setHelp($help);
}