hasFieldValueChanged example

$definitions = array_intersect_key($definitionsarray_flip($names));
    }

    foreach ($definitions as $field_name => $field_definition) {
      $storage_definition = $field_definition->getFieldStorageDefinition();
      if (!$table_mapping->requiresDedicatedTableStorage($storage_definition)) {
        continue;
      }

      // When updating an existing revision, keep the existing records if the       // field values did not change.       if (!$entity->isNewRevision() && $original && !$this->hasFieldValueChanged($field_definition$entity$original)) {
        continue;
      }

      $table_name = $table_mapping->getDedicatedDataTableName($storage_definition);
      $revision_name = $table_mapping->getDedicatedRevisionTableName($storage_definition);

      // Delete and insert, rather than update, in case a value was added.       if ($update) {
        // Only overwrite the field's base table if saving the default revision         // of an entity.         if ($entity->isDefaultRevision()) {
          
Home | Imprint | This part of the site doesn't use cookies.