add calendar after update event
authorMichael Spahn <m.spahn@metaways.de>
Tue, 8 Aug 2017 16:03:24 +0000 (18:03 +0200)
committerPhilipp Schüle <p.schuele@metaways.de>
Wed, 9 Aug 2017 10:03:39 +0000 (12:03 +0200)
Change-Id: Ied7c76d76769ec658af428c9a1dd7e1101ef716c
Reviewed-on: http://gerrit.tine20.com/customers/5424
Tested-by: Jenkins CI (http://ci.tine20.com/) <tine20-jenkins@metaways.de>
Reviewed-by: Philipp Schüle <p.schuele@metaways.de>
tine20/Calendar/Controller/Event.php
tine20/Calendar/Event/InspectEventAfterUpdate.php [new file with mode: 0644]

index 64e0d06..7636cf1 100644 (file)
@@ -961,6 +961,10 @@ class Calendar_Controller_Event extends Tinebase_Controller_Record_Abstract impl
         $this->_saveAttendee($record, $currentRecord, $record->isRescheduled($currentRecord));
         // need to save new attendee set in $updatedRecord for modlog
         $updatedRecord->attendee = clone($record->attendee);
+
+        Tinebase_Record_PersistentObserver::getInstance()->fireEvent(new Calendar_Event_InspectEventAfterUpdate([
+            'observable' => $updatedRecord
+        ]));
     }
     
     /**
diff --git a/tine20/Calendar/Event/InspectEventAfterUpdate.php b/tine20/Calendar/Event/InspectEventAfterUpdate.php
new file mode 100644 (file)
index 0000000..01e0a3c
--- /dev/null
@@ -0,0 +1,24 @@
+<?php
+/**
+ * Tine 2.0
+ *
+ * @license      http://www.gnu.org/licenses/agpl.html AGPL Version 3
+ * @author       Michael Spahn <m.spahn@metaways.de>
+ * @copyright    Copyright (c) 2017 Metaways Infosystems GmbH (http://www.metaways.de)
+ *
+ */
+
+/**
+ * event class for event inspection after update
+ *
+ * @package     Calendar
+ */
+class Calendar_Event_InspectEventAfterUpdate extends Tinebase_Event_Observer_Abstract
+{
+    /**
+     * the event to inspect
+     *
+     * @var Calendar_Model_Event
+     */
+    public $observable;
+}
\ No newline at end of file