You are here

public function Map::onChange in Drupal 10

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

Parameters

$property_name: The name of the property.

bool $notify: (optional) Whether to forward the notification to the parent. Defaults to TRUE. By passing FALSE, overrides of this method can re-use the logic of parent classes without triggering notification.

Overrides TraversableTypedDataInterface::onChange

4 calls to Map::onChange()
EntityReferenceItem::onChange in core/lib/Drupal/Core/Field/Plugin/Field/FieldType/EntityReferenceItem.php
React to changes to a child property or item.
LanguageItem::onChange in core/lib/Drupal/Core/Field/Plugin/Field/FieldType/LanguageItem.php
React to changes to a child property or item.
Map::set in core/lib/Drupal/Core/TypedData/Plugin/DataType/Map.php
Sets a property value.
TextItemBase::onChange in core/modules/text/src/Plugin/Field/FieldType/TextItemBase.php
React to changes to a child property or item.
4 methods override Map::onChange()
DateTimeItem::onChange in core/modules/datetime/src/Plugin/Field/FieldType/DateTimeItem.php
React to changes to a child property or item.
EntityReferenceItem::onChange in core/lib/Drupal/Core/Field/Plugin/Field/FieldType/EntityReferenceItem.php
React to changes to a child property or item.
LanguageItem::onChange in core/lib/Drupal/Core/Field/Plugin/Field/FieldType/LanguageItem.php
React to changes to a child property or item.
TextItemBase::onChange in core/modules/text/src/Plugin/Field/FieldType/TextItemBase.php
React to changes to a child property or item.

File

core/lib/Drupal/Core/TypedData/Plugin/DataType/Map.php, line 229

Class

Map
The "map" data type.

Namespace

Drupal\Core\TypedData\Plugin\DataType

Code

public function onChange($property_name, $notify = TRUE) {

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