function EntityStorageInterface::save
Same name in other branches
- 9 core/lib/Drupal/Core/Entity/EntityStorageInterface.php \Drupal\Core\Entity\EntityStorageInterface::save()
- 8.9.x core/lib/Drupal/Core/Entity/EntityStorageInterface.php \Drupal\Core\Entity\EntityStorageInterface::save()
- 11.x core/lib/Drupal/Core/Entity/EntityStorageInterface.php \Drupal\Core\Entity\EntityStorageInterface::save()
Saves the entity permanently.
Parameters
\Drupal\Core\Entity\EntityInterface $entity: The entity to save.
Return value
int|null SAVED_NEW or SAVED_UPDATED is returned depending on the operation performed.
Throws
\Drupal\Core\Entity\EntityStorageException In case of failures, an exception is thrown.
1 method overrides EntityStorageInterface::save()
- EntityStorageBase::save in core/
lib/ Drupal/ Core/ Entity/ EntityStorageBase.php - Saves the entity permanently.
File
-
core/
lib/ Drupal/ Core/ Entity/ EntityStorageInterface.php, line 158
Class
- EntityStorageInterface
- Defines the interface for entity storage classes.
Namespace
Drupal\Core\EntityCode
public function save(EntityInterface $entity);
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.