Open Data Catalog v2.0.0
Drupal\metastore\Factory\MetastoreItemFactoryInterface Interface Reference
Inheritance diagram for Drupal\metastore\Factory\MetastoreItemFactoryInterface:
Drupal\metastore\Factory\MetastoreEntityItemFactoryInterface Drupal\metastore\NodeWrapper\NodeDataFactory

Public Member Functions

 __construct (EntityRepository $entityRepository)
 
 getInstance (string $identifier, array $config=[])
 
 wrap ($input)
 

Static Public Member Functions

static getCacheTags ()
 

Detailed Description

Interface MetastoreItemFactoryInterface.

Used for service dkan.metastore.metastore_item_factory. Override the service to use different logic for producing a MetastoreItemInterface object from just an indentifier.

Definition at line 15 of file MetastoreItemFactoryInterface.php.

Constructor & Destructor Documentation

◆ __construct()

Drupal\metastore\Factory\MetastoreItemFactoryInterface::__construct ( EntityRepository  $entityRepository)

Constructor.

Parameters
\Drupal\Core\Entity\EntityRepository$entityRepositoryEntity Repository service.

Implemented in Drupal\metastore\NodeWrapper\NodeDataFactory.

Member Function Documentation

◆ getCacheTags()

static Drupal\metastore\Factory\MetastoreItemFactoryInterface::getCacheTags ( )
static

Return list cache tags for metastore items.

Returns
array An array of cache tags.
Todo:
Make this schema-specific.

Implemented in Drupal\metastore\NodeWrapper\NodeDataFactory.

◆ getInstance()

Drupal\metastore\Factory\MetastoreItemFactoryInterface::getInstance ( string  $identifier,
array  $config = [] 
)

Return a metastore item.

Parameters
string$identifierItem ID, usually a UUID.
array$configUser config; not usually used.
Returns
\Drupal\metastore\MetastoreItemInterface A metastore item object.

Implemented in Drupal\metastore\NodeWrapper\NodeDataFactory.

◆ wrap()

Drupal\metastore\Factory\MetastoreItemFactoryInterface::wrap (   $input)

Wrap an arbitrary object as a metastore item interface compliant object.

Parameters
mixed$inputAny object that can be wrapped as a metastore item. For instance, a node.
Returns
Drupal\metastore\MetastoreItemInterface A metastore item interface compliant object.

Implemented in Drupal\metastore\NodeWrapper\NodeDataFactory.