public function MappedObjectStorage::loadByEntity in Salesforce Suite 8.3
Same name and namespace in other branches
- 8.4 modules/salesforce_mapping/src/MappedObjectStorage.php \Drupal\salesforce_mapping\MappedObjectStorage::loadByEntity()
- 5.0.x modules/salesforce_mapping/src/MappedObjectStorage.php \Drupal\salesforce_mapping\MappedObjectStorage::loadByEntity()
Load MappedObjects by Drupal Entity.
Parameters
\Drupal\Core\Entity\EntityInterface $entity: Drupal entity.
Return value
\Drupal\salesforce_mapping\Entity\MappedObject[] Mapped objects.
See also
loadByProperties()
File
- modules/
salesforce_mapping/ src/ MappedObjectStorage.php, line 96
Class
- MappedObjectStorage
- Class MappedObjectStorage.
Namespace
Drupal\salesforce_mappingCode
public function loadByEntity(EntityInterface $entity) {
return $this
->loadByProperties([
'drupal_entity__target_type' => $entity
->getEntityTypeId(),
'drupal_entity__target_id' => $entity
->id(),
]);
}