public function MappedObjectStorage::loadBySfidAndMapping in Salesforce Suite 5.0.x
Same name and namespace in other branches
- 8.4 modules/salesforce_mapping/src/MappedObjectStorage.php \Drupal\salesforce_mapping\MappedObjectStorage::loadBySfidAndMapping()
- 8.3 modules/salesforce_mapping/src/MappedObjectStorage.php \Drupal\salesforce_mapping\MappedObjectStorage::loadBySfidAndMapping()
Load a single MappedObject by Mapping and SFID.
Parameters
\Drupal\salesforce\SFID $salesforce_id: Salesforce id.
\Drupal\salesforce_mapping\Entity\SalesforceMappingInterface $mapping: Salesforce mapping.
Return value
\Drupal\salesforce_mapping\Entity\MappedObjectInterface|null Mapped object, or null if none are found.
See also
loadByProperties()
File
- modules/
salesforce_mapping/ src/ MappedObjectStorage.php, line 109
Class
- MappedObjectStorage
- Class MappedObjectStorage.
Namespace
Drupal\salesforce_mappingCode
public function loadBySfidAndMapping(SFID $salesforce_id, SalesforceMappingInterface $mapping) {
$result = $this
->loadByProperties([
'salesforce_id' => (string) $salesforce_id,
'salesforce_mapping' => $mapping
->id(),
]);
return empty($result) ? NULL : reset($result);
}