protected function SalesforceCommandsBase::returnQueryResult in Salesforce Suite 8.4
Same name and namespace in other branches
- 8.3 src/Commands/SalesforceCommandsBase.php \Drupal\salesforce\Commands\SalesforceCommandsBase::returnQueryResult()
- 5.0.x src/Commands/SalesforceCommandsBase.php \Drupal\salesforce\Commands\SalesforceCommandsBase::returnQueryResult()
Pass-through helper to add appropriate formatters for a query result.
Parameters
\Drupal\salesforce\Commands\QueryResult $query: The query result.
Return value
\Drupal\salesforce\Commands\QueryResult The same, unchanged query result.
2 calls to SalesforceCommandsBase::returnQueryResult()
- SalesforceCommands::executeQuery in src/
Commands/ SalesforceCommands.php - Execute a SOQL query.
- SalesforceCommands::queryObject in src/
Commands/ SalesforceCommands.php - Query an object using SOQL with specified conditions.
1 method overrides SalesforceCommandsBase::returnQueryResult()
- SalesforceMappingCommandsBase::returnQueryResult in modules/
salesforce_mapping/ src/ Commands/ SalesforceMappingCommandsBase.php - Pass-through helper to add appropriate formatters for a query result.
File
- src/
Commands/ SalesforceCommandsBase.php, line 95
Class
- SalesforceCommandsBase
- Shared command base for Salesforce Drush commands.
Namespace
Drupal\salesforce\CommandsCode
protected function returnQueryResult(QueryResult $query) {
$formatter = new QueryResultTableFormatter();
$formatterManager = Drush::getContainer()
->get('formatterManager');
$formatterManager
->addFormatter('table', $formatter);
return $query;
}