protected ContentEntityStorageBase::doPreSave(EntityInterface $entity)
Performs presave entity processing.
\Drupal\Core\Entity\EntityInterface $entity: The saved entity.
int|string The processed entity identifier.
\Drupal\Core\Entity\EntityStorageException If the entity identifier is invalid.
Overrides EntityStorageBase::doPreSave
protected function doPreSave(EntityInterface $entity) { /** @var \Drupal\Core\Entity\ContentEntityBase $entity */ // Sync the changes made in the fields array to the internal values array. $entity->updateOriginalValues(); return parent::doPreSave($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!ContentEntityStorageBase.php/function/ContentEntityStorageBase::doPreSave/8.1.x