protected function SalesforceCommandsBase::interactObject in Salesforce Suite 8.4
Same name and namespace in other branches
- 8.3 src/Commands/SalesforceCommandsBase.php \Drupal\salesforce\Commands\SalesforceCommandsBase::interactObject()
- 5.0.x src/Commands/SalesforceCommandsBase.php \Drupal\salesforce\Commands\SalesforceCommandsBase::interactObject()
Collect a salesforce object name, and set it to "object" argument.
NB: there's no actual validation done here against Salesforce objects. If there's a way to attach multiple hooks to one method, please patch this.
7 calls to SalesforceCommandsBase::interactObject()
- SalesforceCommands::interactCreateObject in src/
Commands/ SalesforceCommands.php - Fetch an object type and object data interactively.
- SalesforceCommands::interactDescribeFields in src/
Commands/ SalesforceCommands.php - Wrap ::interactObject for describe-fields.
- SalesforceCommands::interactDescribeMetadata in src/
Commands/ SalesforceCommands.php - Wrap ::interactObject for describe-metadata.
- SalesforceCommands::interactDescribeObject in src/
Commands/ SalesforceCommands.php - Wrap ::interactObject for describe-object.
- SalesforceCommands::interactDescribeRecordTypes in src/
Commands/ SalesforceCommands.php - Wrap ::interactObject for describe-record-types.
File
- src/
Commands/ SalesforceCommandsBase.php, line 76
Class
- SalesforceCommandsBase
- Shared command base for Salesforce Drush commands.
Namespace
Drupal\salesforce\CommandsCode
protected function interactObject(Input $input, Output $output, $message = 'Choose a Salesforce object name') {
if (!$input
->getArgument('object')) {
$objects = $this->client
->objects();
if (!($answer = $this
->io()
->choice($message, array_combine(array_keys($objects), array_keys($objects))))) {
throw new UserAbortException();
}
$input
->setArgument('object', $answer);
}
}