You are here

public function FieldItemListInterface::hasAffectingChanges in Drupal 9

Same name and namespace in other branches
  1. 8 core/lib/Drupal/Core/Field/FieldItemListInterface.php \Drupal\Core\Field\FieldItemListInterface::hasAffectingChanges()

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.

Parameters

\Drupal\Core\Field\FieldItemListInterface $original_items: The original field items to compare against.

string $langcode: The language that should be checked.

Return value

bool TRUE if the field has relevant changes, FALSE if not.

1 method overrides FieldItemListInterface::hasAffectingChanges()
FieldItemList::hasAffectingChanges in core/lib/Drupal/Core/Field/FieldItemList.php
Determines whether the field has relevant changes.

File

core/lib/Drupal/Core/Field/FieldItemListInterface.php, line 298

Class

FieldItemListInterface
Interface for fields, being lists of field items.

Namespace

Drupal\Core\Field

Code

public function hasAffectingChanges(FieldItemListInterface $original_items, $langcode);