new observable for Calendar->inspectEvent
authorCornelius Weiß <c.weiss@metaways.de>
Thu, 29 Jun 2017 13:59:10 +0000 (15:59 +0200)
committerCornelius Weiss <c.weiss@metaways.de>
Wed, 5 Jul 2017 12:42:03 +0000 (14:42 +0200)
Change-Id: Ib947f5b21ea2c0315b1c7faf86872d6118e89669
Reviewed-on: http://gerrit.tine20.com/customers/4982
Tested-by: Jenkins CI (http://ci.tine20.com/)
Reviewed-by: Cornelius Weiss <c.weiss@metaways.de>
tine20/Calendar/Controller/Event.php
tine20/Calendar/Event/InspectEvent.php [new file with mode: 0644]

index 22f1436..a0c1f0c 100644 (file)
@@ -2088,6 +2088,10 @@ class Calendar_Controller_Event extends Tinebase_Controller_Record_Abstract impl
         if ($_record->rrule_constraints) {
             $this->setConstraintsExdates($_record);
         }
+
+        Tinebase_Record_PersistentObserver::getInstance()->fireEvent(new Calendar_Event_InspectEvent(array(
+            'observable' => $_record
+        )));
     }
 
     /**
diff --git a/tine20/Calendar/Event/InspectEvent.php b/tine20/Calendar/Event/InspectEvent.php
new file mode 100644 (file)
index 0000000..a7713dc
--- /dev/null
@@ -0,0 +1,24 @@
+<?php
+/**
+ * Tine 2.0
+ *
+ * @package     Calendar
+ * @license     http://www.gnu.org/licenses/agpl.html AGPL Version 3
+ * @copyright   Copyright (c) 2017 Metaways Infosystems GmbH (http://www.metaways.de)
+ * @author      Cornelius Weiß <c.weiss@metaways.de>
+ */
+
+/**
+ * event class for event inspection
+ *
+ * @package     Calendar
+ */
+class Calendar_Event_InspectEvent extends Tinebase_Event_Observer_Abstract
+{
+    /**
+     * the event to inspect
+     *
+     * @var Calendar_Model_Event
+     */
+    public $observable;
+}
\ No newline at end of file