Back to GetConfigurationCommand 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
{
    $groups = $this->getGroups();
    foreach ($groups as $key => $group) {
        $groupNames[] = $group['name'];
    }
    $groupNames = implode(', ', $groupNames);
    $this->addArgument('option', null, 'Name of the option');
    $this->addOption('group', 'g', InputOption::VALUE_REQUIRED, 'Name of the option');
    $help = "<info>%command.name%</info> displays the current value of a configuration option\n\t\t\t\t\nUsage: <info>php %command.full_name%</info> <option>\n\t\t\t\t\nGroup usage: <info>php %command.full_name%</info> --group <groupname>\n\t\t\t\t\nAvailable group names: {$groupNames}";
    $this->setDescription('Display the current value of a configuration option');
    $this->setHelp($help);
}