Open Data Catalog v
Drupal\metastore\Reference\OrphanChecker Class Reference

Public Member Functions

 __construct (ConfigFactoryInterface $configService, QueueFactory $queueService)
 processReferencesInDeletedDataset ($data)
 processReferencesInUpdatedDataset ($old_dataset, $new_dataset)

Protected Attributes


Detailed Description

Checks for orphanned references in deleted datasets.

Definition at line 11 of file OrphanChecker.php.

Constructor & Destructor Documentation

◆ __construct()

Drupal\metastore\Reference\OrphanChecker::__construct ( ConfigFactoryInterface  $configService,
QueueFactory  $queueService 


Definition at line 24 of file OrphanChecker.php.

Member Function Documentation

◆ processReferencesInDeletedDataset()

Drupal\metastore\Reference\OrphanChecker::processReferencesInDeletedDataset (   $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$dataDataset to be deleted.

Definition at line 44 of file OrphanChecker.php.

◆ processReferencesInUpdatedDataset()

Drupal\metastore\Reference\OrphanChecker::processReferencesInUpdatedDataset (   $old_dataset,


object$old_datasetOld dataset.
object$new_datasetUpdated dataset.

Definition at line 64 of file OrphanChecker.php.

Member Data Documentation

◆ $queueService


Definition at line 19 of file OrphanChecker.php.