You are here

public function SalesforceCommands::describeObject in Salesforce Suite 8.4

Same name and namespace in other branches
  1. 8.3 src/Commands/SalesforceCommands.php \Drupal\salesforce\Commands\SalesforceCommands::describeObject()
  2. 5.0.x src/Commands/SalesforceCommands.php \Drupal\salesforce\Commands\SalesforceCommands::describeObject()

Retrieve all the metadata for an object, including fields.

@option output Specify an output type. Options are: info: (default) Display metadata about an object fields: Display information about fields that are part of the object field: Display information about a specific field of an object raw: Display the complete, raw describe response. @option field For "field" output type, specify a fieldname. @usage drush sfdo Contact Show metadata about Contact SObject type. @usage drush sfdo Contact --output=fields Show addtional metadata about Contact fields. @usage drush sfdo Contact --output=field --field=Email Show full metadata about Contact.Email field. @usage drush sfdo Contact --output=raw Display the full metadata for Contact SObject type.

@command salesforce:describe-object-deprecated

Parameters

string $object: The object name in Salesforce.

array $options: An associative array of options whose values come from cli, aliases, config, etc.

Return value

\Consolidation\OutputFormatters\StructuredData\RowsOfFields|null Describe result.

Throws

\Exception

File

src/Commands/SalesforceCommands.php, line 187

Class

SalesforceCommands
A Drush commandfile.

Namespace

Drupal\salesforce\Commands

Code

public function describeObject($object, array $options = [
  'output' => NULL,
  'field' => NULL,
]) {
  return $this
    ->describeFields($object);
}