Updated Drupal to 8.6. This goes with the following updates because it's possible...
[yaffs-website] / web / core / lib / Drupal / Core / Field / FieldItemListInterface.php
index c350432e21a7b9cf98c6994ab6a1419d65ec671f..ca24bd4e0fa129a42461eb3e459796713d80c55e 100644 (file)
@@ -30,7 +30,7 @@ interface FieldItemListInterface extends ListInterface, AccessibleInterface {
   /**
    * Gets the entity that field belongs to.
    *
-   * @return \Drupal\Core\Entity\EntityInterface
+   * @return \Drupal\Core\Entity\FieldableEntityInterface
    *   The entity object.
    */
   public function getEntity();
@@ -263,6 +263,9 @@ interface FieldItemListInterface extends ListInterface, AccessibleInterface {
   /**
    * 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.
    *
@@ -271,4 +274,24 @@ interface FieldItemListInterface extends ListInterface, AccessibleInterface {
    */
   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);
+
 }