Open Data Catalog v2.0.0
Drupal\metastore\Reference\ReferenceLookup Class Reference
Inheritance diagram for Drupal\metastore\Reference\ReferenceLookup:
Drupal\metastore\ReferenceLookupInterface

Public Member Functions

 __construct (FactoryInterface $metastoreStorage, MetastoreItemFactoryInterface $metastoreItemFactory, CacheTagsInvalidatorInterface $invalidator, ModuleHandlerInterface $moduleHandler)
 
 getReferencers (string $schemaId, string $referenceId, string $propertyId)
 
 invalidateReferencerCacheTags (string $schemaId, string $referenceId, string $propertyId)
 

Protected Member Functions

 decodeJsonMetadata (string $json)
 

Protected Attributes

 $metastoreStorage
 
 $metastoreItemFactory
 

Detailed Description

{}

Definition at line 18 of file ReferenceLookup.php.

Constructor & Destructor Documentation

◆ __construct()

Drupal\metastore\Reference\ReferenceLookup::__construct ( FactoryInterface  $metastoreStorage,
MetastoreItemFactoryInterface  $metastoreItemFactory,
CacheTagsInvalidatorInterface  $invalidator,
ModuleHandlerInterface  $moduleHandler 
)

Definition at line 41 of file ReferenceLookup.php.

Member Function Documentation

◆ decodeJsonMetadata()

Drupal\metastore\Reference\ReferenceLookup::decodeJsonMetadata ( string  $json)
protected

Decode the supplied JSON metadata.

Parameters
string$jsonJSON metadata string.
Returns
array JSON metadata identifier and object.

Definition at line 106 of file ReferenceLookup.php.

◆ getReferencers()

Drupal\metastore\Reference\ReferenceLookup::getReferencers ( string  $schemaId,
string  $referenceId,
string  $propertyId 
)

{Get UUIDs of all metastore items referencing an ID through a property.

Parameters
string$schemaIdThe type of metadata to look for references within.
string$referenceIdThe UUID of the reference we're looking for.
string$propertyIdThe metadata property we hope to find it in.
Returns
array Array of metastore UUIDs for matching items.
}

Todo:
Refactor when this storage vs item factory mess is resolved.

Implements Drupal\metastore\ReferenceLookupInterface.

Definition at line 58 of file ReferenceLookup.php.

◆ invalidateReferencerCacheTags()

Drupal\metastore\Reference\ReferenceLookup::invalidateReferencerCacheTags ( string  $schemaId,
string  $referenceId,
string  $propertyId 
)

Invalidate cache tags in any items pointing to a reference.

Parameters
string$schemaIdThe type of metadata to look for references within.
string$referenceIdThe UUID of the reference we're looking for.
string$propertyIdThe metadata property we hope to find it in.

Definition at line 87 of file ReferenceLookup.php.

Member Data Documentation

◆ $metastoreItemFactory

Drupal\metastore\Reference\ReferenceLookup::$metastoreItemFactory
protected

Definition at line 34 of file ReferenceLookup.php.

◆ $metastoreStorage

Drupal\metastore\Reference\ReferenceLookup::$metastoreStorage
protected

Definition at line 27 of file ReferenceLookup.php.