protected function SalesforceMappingCommandsBase::doMappingNameOptions in Salesforce Suite 5.0.x
Same name and namespace in other branches
- 8.4 modules/salesforce_mapping/src/Commands/SalesforceMappingCommandsBase.php \Drupal\salesforce_mapping\Commands\SalesforceMappingCommandsBase::doMappingNameOptions()
- 8.3 modules/salesforce_mapping/src/Commands/SalesforceMappingCommandsBase.php \Drupal\salesforce_mapping\Commands\SalesforceMappingCommandsBase::doMappingNameOptions()
Helper method to collect the choice from user, given a set of options.
1 call to SalesforceMappingCommandsBase::doMappingNameOptions()
- SalesforceMappingCommandsBase::interactMapping in modules/
salesforce_mapping/ src/ Commands/ SalesforceMappingCommandsBase.php - Collect a salesforce mapping interactively.
File
- modules/
salesforce_mapping/ src/ Commands/ SalesforceMappingCommandsBase.php, line 126
Class
- SalesforceMappingCommandsBase
- Shared command base for Salesforce Drush commands.
Namespace
Drupal\salesforce_mapping\CommandsCode
protected function doMappingNameOptions(Input $input, array $options, $message, $allOption = FALSE) {
$options = array_combine($options, $options);
if ($allOption) {
$options['ALL'] = $allOption;
}
if (!($answer = $this
->io()
->choice($message, $options))) {
throw new UserAbortException();
}
$input
->setArgument('name', $answer);
}