3 namespace Drupal\Core\Field;
5 use Drupal\Core\Access\AccessResult;
6 use Drupal\Core\Session\AccountInterface;
9 * Defines a item list class for changed fields.
11 class ChangedFieldItemList extends FieldItemList {
16 public function defaultAccess($operation = 'view', AccountInterface $account = NULL) {
17 // It is not possible to edit the changed field.
18 return AccessResult::allowedIf($operation !== 'edit');
24 public function hasAffectingChanges(FieldItemListInterface $original_items, $langcode) {
25 // When saving entities in the user interface, the changed timestamp is
26 // automatically incremented by ContentEntityForm::submitForm() even if
27 // nothing was actually changed. Thus, the changed time needs to be
28 // ignored when determining whether there are any actual changes in the