Public Member Functions | |
| __construct (ConfigFactoryInterface $configService, QueueFactory $queueService) | |
| processReferencesInDeletedDataset (stdClass $data) | |
| processReferencesInUpdatedDataset (stdClass $old_dataset, stdClass $new_dataset) | |
Protected Attributes | |
| $queueService | |
Definition at line 13 of file OrphanChecker.php.
| Drupal\dkan_data\Reference\OrphanChecker::__construct | ( | ConfigFactoryInterface | $configService, |
| QueueFactory | $queueService | ||
| ) |
Constructor.
Definition at line 27 of file OrphanChecker.php.
| Drupal\dkan_data\Reference\OrphanChecker::processReferencesInDeletedDataset | ( | stdClass | $data | ) |
Check for orphan references when a dataset is being deleted.
This function queues each property that holds a reference to be put through the orphan-check process.
If the object referenced is still referenced by other objects it is left alone. If no other reference exists, it is deleted.
When an object is deleted, the referenced objects for all properties must be checked.
| object | $data | Dataset to be deleted. |
Definition at line 47 of file OrphanChecker.php.
| Drupal\dkan_data\Reference\OrphanChecker::processReferencesInUpdatedDataset | ( | stdClass | $old_dataset, |
| stdClass | $new_dataset | ||
| ) |
Public.
| object | $old_dataset | Old dataset. |
| object | $new_dataset | Updated dataset. |
Definition at line 64 of file OrphanChecker.php.
|
protected |
Definition at line 22 of file OrphanChecker.php.