Open Data Catalog v2.0.0
Drupal\metastore\Plugin\QueueWorker\OrphanReferenceProcessor Class Reference
Inheritance diagram for Drupal\metastore\Plugin\QueueWorker\OrphanReferenceProcessor:

Public Member Functions

 __construct (array $configuration, $plugin_id, $plugin_definition, NodeStorageInterface $nodeStorage, ReferenceLookupInterface $referenceLookup)
 
 processItem ($data)
 

Static Public Member Functions

static create (ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition)
 

Public Attributes

const EVENT_ORPHANING_DISTRIBUTION = 'metastore_orphaning_distribution'
 

Protected Member Functions

 unpublishReference (string $property_id, string $uuid)
 

Protected Attributes

 $nodeStorage
 

Detailed Description

Verifies if a dataset property reference is orphaned, then deletes it.

@QueueWorker( id = "orphan_reference_processor", title = @Translation("Task Worker: Check for orphaned property reference"), cron = {"time" = 15} )

@codeCoverageIgnore

Definition at line 26 of file OrphanReferenceProcessor.php.

Constructor & Destructor Documentation

◆ __construct()

Drupal\metastore\Plugin\QueueWorker\OrphanReferenceProcessor::__construct ( array  $configuration,
  $plugin_id,
  $plugin_definition,
NodeStorageInterface  $nodeStorage,
ReferenceLookupInterface  $referenceLookup 
)

Constructs a new class instance.

Parameters
array$configurationA configuration array containing information about the plugin instance.
string$plugin_idThe plugin_id for the plugin instance.
mixed$plugin_definitionThe plugin implementation definition.
\Drupal\node\NodeStorageInterface$nodeStorageNode storage service.
\Drupal\metastore\ReferenceLookupInterface$referenceLookupThe referencer lookup service.

Definition at line 53 of file OrphanReferenceProcessor.php.

Member Function Documentation

◆ create()

static Drupal\metastore\Plugin\QueueWorker\OrphanReferenceProcessor::create ( ContainerInterface  $container,
array  $configuration,
  $plugin_id,
  $plugin_definition 
)
static

Inherited.

{}

Definition at line 69 of file OrphanReferenceProcessor.php.

◆ processItem()

Drupal\metastore\Plugin\QueueWorker\OrphanReferenceProcessor::processItem (   $data)

{}

Todo:
make the SchemaID for this dynamic

Definition at line 86 of file OrphanReferenceProcessor.php.

◆ unpublishReference()

Drupal\metastore\Plugin\QueueWorker\OrphanReferenceProcessor::unpublishReference ( string  $property_id,
string  $uuid 
)
protected

Unpublish a reference.

Parameters
string$property_idThe property id.
string$uuidThe uuid.

Definition at line 107 of file OrphanReferenceProcessor.php.

Member Data Documentation

◆ $nodeStorage

Drupal\metastore\Plugin\QueueWorker\OrphanReferenceProcessor::$nodeStorage
protected

Definition at line 37 of file OrphanReferenceProcessor.php.

◆ EVENT_ORPHANING_DISTRIBUTION

const Drupal\metastore\Plugin\QueueWorker\OrphanReferenceProcessor::EVENT_ORPHANING_DISTRIBUTION = 'metastore_orphaning_distribution'

Definition at line 30 of file OrphanReferenceProcessor.php.