diff --git a/core/lib/Drupal/Core/TypedData/ComplexDataInterface.php b/core/lib/Drupal/Core/TypedData/ComplexDataInterface.php index 0a5b38a5ceb..e7b91fc26fc 100644 --- a/core/lib/Drupal/Core/TypedData/ComplexDataInterface.php +++ b/core/lib/Drupal/Core/TypedData/ComplexDataInterface.php @@ -100,13 +100,4 @@ interface ComplexDataInterface extends TraversableTypedDataInterface { */ public function isEmpty(); - /** - * React to changes to a child property. - * - * Note that this is invoked after any changes have been applied. - * - * @param $property_name - * The name of the property which is changed. - */ - public function onChange($property_name); } diff --git a/core/lib/Drupal/Core/TypedData/ListInterface.php b/core/lib/Drupal/Core/TypedData/ListInterface.php index 2c5dbc7f6f0..4e78b48139c 100644 --- a/core/lib/Drupal/Core/TypedData/ListInterface.php +++ b/core/lib/Drupal/Core/TypedData/ListInterface.php @@ -38,16 +38,6 @@ interface ListInterface extends TraversableTypedDataInterface, \ArrayAccess, \Co */ public function getItemDefinition(); - /** - * React to changes to a child item. - * - * Note that this is invoked after any changes have been applied. - * - * @param $delta - * The delta of the item which is changed. - */ - public function onChange($delta); - /** * Returns the item at the specified position in this list. * diff --git a/core/lib/Drupal/Core/TypedData/TraversableTypedDataInterface.php b/core/lib/Drupal/Core/TypedData/TraversableTypedDataInterface.php index d42557ee752..34b1df5ec6a 100644 --- a/core/lib/Drupal/Core/TypedData/TraversableTypedDataInterface.php +++ b/core/lib/Drupal/Core/TypedData/TraversableTypedDataInterface.php @@ -10,4 +10,16 @@ namespace Drupal\Core\TypedData; /** * An interface for typed data objects that can be traversed. */ -interface TraversableTypedDataInterface extends TypedDataInterface, \Traversable {} +interface TraversableTypedDataInterface extends TypedDataInterface, \Traversable { + + /** + * React to changes to a child property or item. + * + * Note that this is invoked after any changes have been applied. + * + * @param $name + * The name of the property or the delta of the list item which is changed. + */ + public function onChange($name); + +}