/**
* Gets the entity that field belongs to.
*
- * @return \Drupal\Core\Entity\EntityInterface
+ * @return \Drupal\Core\Entity\FieldableEntityInterface
* The entity object.
*/
public function getEntity();
/**
* Determines equality to another object implementing FieldItemListInterface.
*
+ * This method is usually used by the storage to check for not computed
+ * value changes, which will be saved into the storage.
+ *
* @param \Drupal\Core\Field\FieldItemListInterface $list_to_compare
* The field item list to compare to.
*
*/
public function equals(FieldItemListInterface $list_to_compare);
+ /**
+ * Determines whether the field has relevant changes.
+ *
+ * This is for example used to determine if a revision of an entity has
+ * changes in a given translation. Unlike
+ * \Drupal\Core\Field\FieldItemListInterface::equals(), this can report
+ * that for example an untranslatable field, despite being changed and
+ * therefore technically affecting all translations, is only internal metadata
+ * or only affects a single translation.
+ *
+ * @param \Drupal\Core\Field\FieldItemListInterface $original_items
+ * The original field items to compare against.
+ * @param string $langcode
+ * The language that should be checked.
+ *
+ * @return bool
+ * TRUE if the field has relevant changes, FALSE if not.
+ */
+ public function hasAffectingChanges(FieldItemListInterface $original_items, $langcode);
+
}