Overrides \Drupal\Core\Entity\Entity::save().
int Either SAVED_NEW or SAVED_UPDATED, depending on the operation performed.
\Drupal\field\FieldException If the field definition is invalid.
\Drupal\Core\Entity\EntityStorageException In case of failures at the configuration storage level.
Overrides Entity::save
public function save() {
// Clear the derived data about the field.
unset($this->schema, $this->storageDetails);
if ($this
->isNew()) {
return $this
->saveNew();
}
else {
return $this
->saveUpdated();
}
}