Platformsh\Cli\Util\PropertyFormatter::configureInput PHP Method

configureInput() public static method

Add options to a command's input definition.
public static configureInput ( Symfony\Component\Console\Input\InputDefinition $definition )
$definition Symfony\Component\Console\Input\InputDefinition
    public static function configureInput(InputDefinition $definition)
    {
        $description = 'The date format (as a PHP date format string)';
        $option = new InputOption('date-fmt', null, InputOption::VALUE_REQUIRED, $description, self::DEFAULT_DATE_FORMAT);
        $definition->addOption($option);
    }

Usage Example

 /**
  * {@inheritdoc}
  */
 protected function configure()
 {
     $this->setName('domain:get')->setDescription('Show detailed information for a domain')->addArgument('name', InputArgument::OPTIONAL, 'The domain name')->addOption('property', 'P', InputOption::VALUE_REQUIRED, 'The domain property to view');
     Table::addFormatOption($this->getDefinition());
     PropertyFormatter::configureInput($this->getDefinition());
     $this->addProjectOption();
 }
All Usage Examples Of Platformsh\Cli\Util\PropertyFormatter::configureInput