public function EntityNG::updateOriginalValues

Updates the original values with the interim changes.

File

drupal/core/lib/Drupal/Core/Entity/EntityNG.php, line 446
Contains \Drupal\Core\Entity\EntityNG.

Class

EntityNG
Implements Entity Field API specific enhancements to the Entity class.

Namespace

Drupal\Core\Entity

Code

public function updateOriginalValues() {
  if (!$this->fields) {
    return;
  }
  foreach ($this
    ->getPropertyDefinitions() as $name => $definition) {
    if (empty($definition['computed']) && !empty($this->fields[$name])) {
      foreach ($this->fields[$name] as $langcode => $field) {
        $field
          ->filterEmptyValues();
        $this->values[$name][$langcode] = $field
          ->getValue();
      }
    }
  }
}