public function FieldItemBase::onChange

Overrides \Drupal\Core\TypedData\Map::onChange().

Overrides Map::onChange

File

drupal/core/lib/Drupal/Core/Entity/Field/FieldItemBase.php, line 131
Contains \Drupal\Core\Entity\Field\FieldItemBase.

Class

FieldItemBase
An entity field item.

Namespace

Drupal\Core\Entity\Field

Code

public function onChange($property_name) {

  // Notify the parent of changes.
  if (isset($this->parent)) {
    $this->parent
      ->onChange($this->name);
  }

  // Remove the plain value, such that any further __get() calls go via the
  // updated property object.
  unset($this->values[$property_name]);
}