public ContentEntityBase::updateOriginalValues()
Updates the original values with the interim changes.
File
- core/lib/Drupal/Core/Entity/ContentEntityBase.php, line 872
Class
- ContentEntityBase
- Implements Entity Field API specific enhancements to the Entity class.
Namespace
Drupal\Core\Entity
Code
1 2 3 4 5 6 7 8 9 10 11 12 13 | 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(); } } } } |
Please login to continue.