public function EntityStorageControllerInterface::save

Saves the entity permanently.

Parameters

\Drupal\Core\Entity\EntityInterface $entity: The entity to save.

Return value

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.

2 methods override EntityStorageControllerInterface::save()

File

drupal/core/lib/Drupal/Core/Entity/EntityStorageControllerInterface.php, line 126
Contains \Drupal\Core\Entity\EntityStorageControllerInterface.

Class

EntityStorageControllerInterface
Defines a common interface for entity controller classes.

Namespace

Drupal\Core\Entity

Code

public function save(EntityInterface $entity);