public function NestedSetStorageFactory::get in Entity Reference Hierarchy 3.x
Same name and namespace in other branches
- 8.2 src/Storage/NestedSetStorageFactory.php \Drupal\entity_hierarchy\Storage\NestedSetStorageFactory::get()
Gets a new nested set storage handler.
Parameters
string $field_name: Field name for storage.
string $entity_type_id: Entity Type ID.
Return value
\Drupal\entity_hierarchy\Storage\NestedSetStorage Nested set for given field.
File
- src/
Storage/ NestedSetStorageFactory.php, line 69
Class
- NestedSetStorageFactory
- Defines a factory for creating a nested set storage handler for hierarchies.
Namespace
Drupal\entity_hierarchy\StorageCode
public function get($field_name, $entity_type_id) {
$table_name = $this
->getTableName($field_name, $entity_type_id);
return $this
->fromTableName($table_name);
}