function FieldItemListInterface::hasAffectingChanges
Same name in other branches
- 9 core/lib/Drupal/Core/Field/FieldItemListInterface.php \Drupal\Core\Field\FieldItemListInterface::hasAffectingChanges()
- 8.9.x core/lib/Drupal/Core/Field/FieldItemListInterface.php \Drupal\Core\Field\FieldItemListInterface::hasAffectingChanges()
- 10 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
File
-
core/
lib/ Drupal/ Core/ Field/ FieldItemListInterface.php, line 298
Class
- FieldItemListInterface
- Interface for fields, being lists of field items.
Namespace
Drupal\Core\FieldCode
public function hasAffectingChanges(FieldItemListInterface $original_items, $langcode);
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.