public function SalesforceCommands::listObjects in Salesforce Suite 5.0.x
Same name and namespace in other branches
- 8.4 src/Commands/SalesforceCommands.php \Drupal\salesforce\Commands\SalesforceCommands::listObjects()
- 8.3 src/Commands/SalesforceCommands.php \Drupal\salesforce\Commands\SalesforceCommands::listObjects()
List the objects that are available in your organization.
@command salesforce:list-objects @aliases sflo,sf-list-objects @field-labels activateable: Activateable createable: Createable custom: Custom customSetting: CustomSetting deletable: Deletable deprecatedAndHidden: DeprecatedAndHidden feedEnabled: FeedEnabled hasSubtypes: HasSubtypes isSubtype: IsSubtype keyPrefix: KeyPrefix label: Label labelPlural: LabelPlural layoutable: Layoutable mergeable: Mergeable mruEnabled: MruEnabled name: Name queryable: Queryable replicateable: Replicateable retrieveable: Retrieveable searchable: Searchable triggerable: Triggerable undeletable: Undeletable updateable: Updateable urls: URLs @default-fields name,label,labelPlural
Return value
\Consolidation\OutputFormatters\StructuredData\RowsOfFields The objects.
Throws
\Exception
File
- src/
Commands/ SalesforceCommands.php, line 97
Class
- SalesforceCommands
- A Drush commandfile.
Namespace
Drupal\salesforce\CommandsCode
public function listObjects() {
if ($objects = $this->client
->objects()) {
foreach ($objects as $name => $object) {
$rows[$name] = $object;
$rows[$name]['urls'] = new TableCell(implode("\n", $rows[$name]['urls']) . "\n");
}
return new RowsOfFields($rows);
}
throw new \Exception('Could not load any information about available objects.');
}