summaryrefslogtreecommitdiffstats
path: root/core/lib/Drupal/Core/TypedData/Plugin/DataType/Timestamp.php
diff options
context:
space:
mode:
authorAlex Pott2013-07-05 19:43:36 +0100
committerAlex Pott2013-07-05 19:43:36 +0100
commit5fc86b002978fc160b98e703b4f5c2bdc2e99792 (patch)
tree9492963f5fb293f460cfd82f8559a239dda3ef9f /core/lib/Drupal/Core/TypedData/Plugin/DataType/Timestamp.php
parent1c9bd12778c7e14444ef2ee5525514e441c61152 (diff)
Issue #1868004 by fago, das-peter, Berdir, EclipseGc, fubhy the cat, dixon_: Improve the TypedData API usage of EntityNG.
Diffstat (limited to 'core/lib/Drupal/Core/TypedData/Plugin/DataType/Timestamp.php')
-rw-r--r--core/lib/Drupal/Core/TypedData/Plugin/DataType/Timestamp.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/core/lib/Drupal/Core/TypedData/Plugin/DataType/Timestamp.php b/core/lib/Drupal/Core/TypedData/Plugin/DataType/Timestamp.php
index 18c99dc..c0cad02 100644
--- a/core/lib/Drupal/Core/TypedData/Plugin/DataType/Timestamp.php
+++ b/core/lib/Drupal/Core/TypedData/Plugin/DataType/Timestamp.php
@@ -41,7 +41,11 @@ class Timestamp extends Integer implements DateTimeInterface {
/**
* {@inheritdoc}
*/
- public function setDateTime(DrupalDateTime $dateTime) {
+ public function setDateTime(DrupalDateTime $dateTime, $notify = TRUE) {
$this->value = $dateTime->getTimestamp();
+ // Notify the parent of any changes.
+ if ($notify && isset($this->parent)) {
+ $this->parent->onChange($this->name);
+ }
}
}