protected SqlContentEntityStorage::doDeleteFieldItems($entities)
Deletes entity field values from the storage.
\Drupal\Core\Entity\ContentEntityInterface[] $entities: An array of entity objects to be deleted.
Overrides ContentEntityStorageBase::doDeleteFieldItems
protected function doDeleteFieldItems($entities) { $ids = array_keys($entities); $this->database->delete($this->entityType->getBaseTable()) ->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); } }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Entity!Sql!SqlContentEntityStorage.php/function/SqlContentEntityStorage::doDeleteFieldItems/8.1.x