You are here

public function ReferenceStorage::getCustomTableMapping in Bibliography & Citation 8

Same name and namespace in other branches
  1. 2.0.x modules/bibcite_entity/src/ReferenceStorage.php \Drupal\bibcite_entity\ReferenceStorage::getCustomTableMapping()

Gets a table mapping for the specified entity type and storage definitions.

@internal

Parameters

\Drupal\Core\Entity\ContentEntityTypeInterface $entity_type: An entity type definition.

\Drupal\Core\Field\FieldStorageDefinitionInterface[] $storage_definitions: An array of field storage definitions to be used to compute the table mapping.

string $prefix: (optional) A prefix to be used by all the tables of this mapping. Defaults to an empty string.

Return value

\Drupal\Core\Entity\Sql\TableMappingInterface A table mapping object for the entity's tables.

Overrides SqlContentEntityStorage::getCustomTableMapping

File

modules/bibcite_entity/src/ReferenceStorage.php, line 32

Class

ReferenceStorage
Defines a Controller class for reference items.

Namespace

Drupal\bibcite_entity

Code

public function getCustomTableMapping(ContentEntityTypeInterface $entity_type, array $storage_definitions, $prefix = '') {
  $prefix = $prefix ?: ($this->temporary ? 'tmp_' : '');
  return ReferenceDefaultTableMapping::create($entity_type, $storage_definitions, $prefix);
}