summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/private/activitymanager.php15
-rw-r--r--lib/public/activity/imanager.php17
2 files changed, 32 insertions, 0 deletions
diff --git a/lib/private/activitymanager.php b/lib/private/activitymanager.php
index 0e4d359959e..a973db7206f 100644
--- a/lib/private/activitymanager.php
+++ b/lib/private/activitymanager.php
@@ -127,6 +127,15 @@ class ActivityManager implements IManager {
}
/**
+ * Generates a new IEvent object
+ *
+ * Make sure to call at least the following methods before sending it to the
+ * app with via the publish() method:
+ * - setApp()
+ * - setType()
+ * - setAffectedUser()
+ * - setSubject()
+ *
* @return IEvent
*/
public function generateEvent() {
@@ -136,6 +145,12 @@ class ActivityManager implements IManager {
/**
* Publish an event to the activity consumers
*
+ * Make sure to call at least the following methods before sending an Event:
+ * - setApp()
+ * - setType()
+ * - setAffectedUser()
+ * - setSubject()
+ *
* @param IEvent $event
* @return null
* @throws \BadMethodCallException if required values have not been set
diff --git a/lib/public/activity/imanager.php b/lib/public/activity/imanager.php
index c3818234f79..b3a4969fb06 100644
--- a/lib/public/activity/imanager.php
+++ b/lib/public/activity/imanager.php
@@ -39,12 +39,29 @@ namespace OCP\Activity;
*/
interface IManager {
/**
+ * Generates a new IEvent object
+ *
+ * Make sure to call at least the following methods before sending it to the
+ * app with via the publish() method:
+ * - setApp()
+ * - setType()
+ * - setAffectedUser()
+ * - setSubject()
+ *
* @return IEvent
* @since 8.2.0
*/
public function generateEvent();
/**
+ * Publish an event to the activity consumers
+ *
+ * Make sure to call at least the following methods before sending an Event:
+ * - setApp()
+ * - setType()
+ * - setAffectedUser()
+ * - setSubject()
+ *
* @param IEvent $event
* @return null
* @since 8.2.0