You are here

public function ItemList::onChange in Drupal 9

Same name and namespace in other branches
  1. 8 core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php \Drupal\Core\TypedData\Plugin\DataType\ItemList::onChange()

React to changes to a child property or item.

Note that this is invoked after any changes have been applied.

Parameters

$name: The name of the property or the delta of the list item which is changed.

Overrides TraversableTypedDataInterface::onChange

1 call to ItemList::onChange()
ModerationStateFieldItemList::onChange in core/modules/content_moderation/src/Plugin/Field/ModerationStateFieldItemList.php
React to changes to a child property or item.
1 method overrides ItemList::onChange()
ModerationStateFieldItemList::onChange in core/modules/content_moderation/src/Plugin/Field/ModerationStateFieldItemList.php
React to changes to a child property or item.

File

core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php, line 286

Class

ItemList
A generic list class.

Namespace

Drupal\Core\TypedData\Plugin\DataType

Code

public function onChange($delta) {

  // Notify the parent of changes.
  if (isset($this->parent)) {
    $this->parent
      ->onChange($this->name);
  }
}