You are here

public function NestedSetStorageFactory::getTableName in Entity Reference Hierarchy 3.x

Same name and namespace in other branches
  1. 8.2 src/Storage/NestedSetStorageFactory.php \Drupal\entity_hierarchy\Storage\NestedSetStorageFactory::getTableName()

Gets table name for a given field name and entity type.

Parameters

string $field_name: Field name.

string $entity_type_id: Entity Type ID.

bool $withPrefix: (optional) TRUE to add prefix. Views data does not need prefix.

Return value

string Table name.

1 call to NestedSetStorageFactory::getTableName()
NestedSetStorageFactory::get in src/Storage/NestedSetStorageFactory.php
Gets a new nested set storage handler.

File

src/Storage/NestedSetStorageFactory.php, line 105

Class

NestedSetStorageFactory
Defines a factory for creating a nested set storage handler for hierarchies.

Namespace

Drupal\entity_hierarchy\Storage

Code

public function getTableName($field_name, $entity_type_id, $withPrefix = TRUE) {
  return sprintf('%snested_set_%s_%s', $withPrefix ? $this->tablePrefix : '', $field_name, $entity_type_id);
}