From 388758f46a33647b6541a731d653fcc6ee371bd3 Mon Sep 17 00:00:00 2001 From: Alex Pott Date: Thu, 23 Oct 2014 12:20:53 +0100 Subject: [PATCH] Issue #2359449 by Jose Reyero: Fixed TypedData calls onChange() parent's method that is not part of the interface. --- .../Drupal/Core/TypedData/ComplexDataInterface.php | 9 --------- core/lib/Drupal/Core/TypedData/ListInterface.php | 10 ---------- .../TypedData/TraversableTypedDataInterface.php | 14 +++++++++++++- 3 files changed, 13 insertions(+), 20 deletions(-) diff --git a/core/lib/Drupal/Core/TypedData/ComplexDataInterface.php b/core/lib/Drupal/Core/TypedData/ComplexDataInterface.php index 0a5b38a5ceb6..e7b91fc26fce 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 2c5dbc7f6f05..4e78b48139c3 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 d42557ee752d..34b1df5ec6ad 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); + +}