function SqlContentEntityStorage::doDeleteFieldItems
Same name in other branches
- 9 core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php \Drupal\Core\Entity\Sql\SqlContentEntityStorage::doDeleteFieldItems()
- 8.9.x core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php \Drupal\Core\Entity\Sql\SqlContentEntityStorage::doDeleteFieldItems()
- 11.x core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php \Drupal\Core\Entity\Sql\SqlContentEntityStorage::doDeleteFieldItems()
Overrides ContentEntityStorageBase::doDeleteFieldItems
File
-
core/
lib/ Drupal/ Core/ Entity/ Sql/ SqlContentEntityStorage.php, line 770
Class
- SqlContentEntityStorage
- A content entity database storage implementation.
Namespace
Drupal\Core\Entity\SqlCode
protected function doDeleteFieldItems($entities) {
$ids = array_keys($entities);
$this->database
->delete($this->baseTable)
->condition($this->idKey, $ids, 'IN')
->execute();
if ($this->revisionTable) {
$this->database
->delete($this->revisionTable)
->condition($this->idKey, $ids, 'IN')
->execute();
}
if ($this->dataTable) {
$this->database
->delete($this->dataTable)
->condition($this->idKey, $ids, 'IN')
->execute();
}
if ($this->revisionDataTable) {
$this->database
->delete($this->revisionDataTable)
->condition($this->idKey, $ids, 'IN')
->execute();
}
foreach ($entities as $entity) {
$this->deleteFromDedicatedTables($entity);
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.