public function NodeStorage::truncate in Multiversion 8
Truncate all related tables to entity type.
This function should be called to avoid calling pre-delete/delete hooks.
Overrides ContentEntityStorageInterface::truncate
File
- src/
Entity/ Storage/ Sql/ NodeStorage.php, line 83
Class
- NodeStorage
- Storage handler for nodes.
Namespace
Drupal\multiversion\Entity\Storage\SqlCode
public function truncate() {
$this
->truncateEntityTables();
/* @var \Drupal\node\NodeAccessControlHandlerInterface $access_control_handler */
$access_control_handler = $this->entityManager
->getAccessControlHandler('node');
$access_control_handler
->deleteGrants();
}