function EntityStorageBase::doSave
Same name in other branches
- 9 core/lib/Drupal/Core/Entity/EntityStorageBase.php \Drupal\Core\Entity\EntityStorageBase::doSave()
- 8.9.x core/lib/Drupal/Core/Entity/EntityStorageBase.php \Drupal\Core\Entity\EntityStorageBase::doSave()
- 10 core/lib/Drupal/Core/Entity/EntityStorageBase.php \Drupal\Core\Entity\EntityStorageBase::doSave()
Performs storage-specific saving of the entity.
Parameters
int|string $id: The original entity ID.
\Drupal\Core\Entity\EntityInterface $entity: The entity to save.
Return value
bool|int If the record insert or update failed, returns FALSE. If it succeeded, returns SAVED_NEW or SAVED_UPDATED, depending on the operation performed.
2 calls to EntityStorageBase::doSave()
- EntityStorageBase::restore in core/
lib/ Drupal/ Core/ Entity/ EntityStorageBase.php - Restores a previously saved entity.
- EntityStorageBase::save in core/
lib/ Drupal/ Core/ Entity/ EntityStorageBase.php - Saves the entity permanently.
3 methods override EntityStorageBase::doSave()
- ConfigEntityStorage::doSave in core/
lib/ Drupal/ Core/ Config/ Entity/ ConfigEntityStorage.php - Performs storage-specific saving of the entity.
- ContentEntityStorageBase::doSave in core/
lib/ Drupal/ Core/ Entity/ ContentEntityStorageBase.php - Performs storage-specific saving of the entity.
- KeyValueEntityStorage::doSave in core/
lib/ Drupal/ Core/ Entity/ KeyValueStore/ KeyValueEntityStorage.php - Performs storage-specific saving of the entity.
File
-
core/
lib/ Drupal/ Core/ Entity/ EntityStorageBase.php, line 546
Class
- EntityStorageBase
- A base entity storage class.
Namespace
Drupal\Core\EntityCode
protected abstract function doSave($id, EntityInterface $entity);
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.