protected function DeleteHandler::handleDeletedRecords in Salesforce Suite 5.0.x
Same name and namespace in other branches
- 8.4 modules/salesforce_pull/src/DeleteHandler.php \Drupal\salesforce_pull\DeleteHandler::handleDeletedRecords()
- 8.3 modules/salesforce_pull/src/DeleteHandler.php \Drupal\salesforce_pull\DeleteHandler::handleDeletedRecords()
Delete records.
Parameters
array $deleted: Array of deleted records.
string $type: Salesforce object type.
Throws
\Drupal\Core\Entity\EntityStorageException
1 call to DeleteHandler::handleDeletedRecords()
- DeleteHandler::processDeletedRecords in modules/
salesforce_pull/ src/ DeleteHandler.php - Process deleted records from salesforce.
File
- modules/
salesforce_pull/ src/ DeleteHandler.php, line 142
Class
- DeleteHandler
- Handles pull cron deletion of Drupal entities based onSF mapping settings.
Namespace
Drupal\salesforce_pullCode
protected function handleDeletedRecords(array $deleted, $type) {
if (empty($deleted['deletedRecords'])) {
return;
}
$sf_mappings = $this->mappingStorage
->loadByProperties([
'salesforce_object_type' => $type,
]);
if (empty($sf_mappings)) {
return;
}
foreach ($deleted['deletedRecords'] as $record) {
$this
->handleDeletedRecord($record, $type);
}
}