public static function SelectQueryResult::createSingle in Salesforce Suite 8.4
Same name and namespace in other branches
- 8.3 src/SelectQueryResult.php \Drupal\salesforce\SelectQueryResult::createSingle()
- 5.0.x src/SelectQueryResult.php \Drupal\salesforce\SelectQueryResult::createSingle()
Convenience method a SelectQueryResult from a single SObject record.
Parameters
\Drupal\salesforce\SObject $record: The record to be created.
Return value
\Drupal\salesforce\SelectQueryResult A query result containing the given record.
1 call to SelectQueryResult::createSingle()
- QueueHandler::getSingleUpdatedRecord in modules/
salesforce_pull/ src/ QueueHandler.php - Given a single mapping/id pair, enqueue it.
File
- src/
SelectQueryResult.php, line 69
Class
- SelectQueryResult
- Class SelectQueryResult.
Namespace
Drupal\salesforceCode
public static function createSingle(SObject $record) {
$results = [
'totalSize' => 1,
'done' => TRUE,
'records' => [],
];
$result = new static($results);
$result->records[(string) $record
->id()] = $record;
return $result;
}