You are here

public function SalesforceCommands::dumpObject in Salesforce Suite 8.3

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

Dump the raw describe response for given object.

@todo create a proper StructuredData return value for this.

@command salesforce:dump-object @aliases sf-dump-object

File

src/Commands/SalesforceCommands.php, line 194

Class

SalesforceCommands
A Drush commandfile.

Namespace

Drupal\salesforce\Commands

Code

public function dumpObject($object) {
  $objectDescription = $this->client
    ->objectDescribe($object);
  if (!is_object($objectDescription)) {
    $this
      ->logger()
      ->error(dt('Could not load data for object !object', [
      '!object' => $object,
    ]));
  }
  $this
    ->output()
    ->writeln(print_r($objectDescription->data, 1));
}