You are here

public function ModerationStateFieldItemList::onChange in Config Entity Revisions 8.2

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 ItemList::onChange

File

src/ModerationStateFieldItemList.php, line 140

Class

ModerationStateFieldItemList
A computed field that provides a content entity's moderation state.

Namespace

Drupal\content_moderation\Plugin\Field

Code

public function onChange($delta) {
  $this
    ->updateModeratedEntity($this->list[$delta]->value);
  parent::onChange($delta);
}