Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. ContentEntityBase.php

function ContentEntityBase::updateOriginalValues

Updates the original values with the interim changes.

File

core/lib/Drupal/Core/Entity/ContentEntityBase.php, line 1056

Class

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

Namespace

Drupal\Core\Entity

Code

public function updateOriginalValues() {
    if (!$this->fields) {
        return;
    }
    foreach ($this->getFieldDefinitions() as $name => $definition) {
        if (!$definition->isComputed() && !empty($this->fields[$name])) {
            foreach ($this->fields[$name] as $langcode => $item) {
                $item->filterEmptyItems();
                $this->values[$name][$langcode] = $item->getValue();
            }
        }
    }
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal