public static function TreeRebuilder::removeTable in Entity Reference Hierarchy 3.x
Same name and namespace in other branches
- 8.2 src/Storage/TreeRebuilder.php \Drupal\entity_hierarchy\Storage\TreeRebuilder::removeTable()
Batch callback to remove table.
Parameters
string $field_name: Field name.
string $entity_type_id: Entity Type ID.
File
- src/
Storage/ TreeRebuilder.php, line 83
Class
- TreeRebuilder
- Defines a class for rebuilding the tree.
Namespace
Drupal\entity_hierarchy\StorageCode
public static function removeTable($field_name, $entity_type_id) {
\Drupal::database()
->schema()
->dropTable(\Drupal::service('entity_hierarchy.nested_set_storage_factory')
->getTableName($field_name, $entity_type_id, FALSE));
}