diff options
author | Joas Schilling <nickvergessen@owncloud.com> | 2015-08-18 09:03:56 +0200 |
---|---|---|
committer | Joas Schilling <nickvergessen@owncloud.com> | 2015-08-19 17:44:57 +0200 |
commit | bc2aa148494671fddb53b939c5ac64366677c34a (patch) | |
tree | 97f768b279944f2ce0800c16d5f3d84776288ac1 /lib/public/activity/imanager.php | |
parent | 4c93a07196ac2c5051872941bbcc2f175d630379 (diff) | |
download | nextcloud-server-bc2aa148494671fddb53b939c5ac64366677c34a.tar.gz nextcloud-server-bc2aa148494671fddb53b939c5ac64366677c34a.zip |
Extend the interfaces IManager and IConsumer to allow passing in the object
Diffstat (limited to 'lib/public/activity/imanager.php')
-rw-r--r-- | lib/public/activity/imanager.php | 51 |
1 files changed, 27 insertions, 24 deletions
diff --git a/lib/public/activity/imanager.php b/lib/public/activity/imanager.php index 0f5dccd8ba1..ef34168e610 100644 --- a/lib/public/activity/imanager.php +++ b/lib/public/activity/imanager.php @@ -40,20 +40,23 @@ namespace OCP\Activity; interface IManager { /** - * @param $app - * @param $subject - * @param $subjectParams - * @param $message - * @param $messageParams - * @param $file - * @param $link - * @param $affectedUser - * @param $type - * @param $priority - * @return mixed + * @param string $app The app where this event is associated with + * @param string $subject A short description of the event + * @param array $subjectParams Array with parameters that are filled in the subject + * @param string $message A longer description of the event + * @param array $messageParams Array with parameters that are filled in the message + * @param string $file The file including path where this event is associated with + * @param string $link A link where this event is associated with + * @param string $affectedUser Recipient of the activity + * @param string $type Type of the notification + * @param int $priority Priority of the notification (@deprecated) + * @param string $objectType Object type can be used to filter the activities later (e.g. files) + * @param int $objectId Object id can be used to filter the activities later (e.g. the ID of the cache entry) + * @return null * @since 6.0.0 + * @since 8.2.0 Added $objectType and $objectId */ - function publishActivity($app, $subject, $subjectParams, $message, $messageParams, $file, $link, $affectedUser, $type, $priority); + public function publishActivity($app, $subject, $subjectParams, $message, $messageParams, $file, $link, $affectedUser, $type, $priority, $objectType = '', $objectId = 0); /** * In order to improve lazy loading a closure can be registered which will be called in case @@ -65,7 +68,7 @@ interface IManager { * @return void * @since 6.0.0 */ - function registerConsumer(\Closure $callable); + public function registerConsumer(\Closure $callable); /** * In order to improve lazy loading a closure can be registered which will be called in case @@ -77,7 +80,7 @@ interface IManager { * @return void * @since 8.0.0 */ - function registerExtension(\Closure $callable); + public function registerExtension(\Closure $callable); /** * Will return additional notification types as specified by other apps @@ -91,21 +94,21 @@ interface IManager { * @since 8.0.0 * @changed 8.2.0 - Added support to allow limiting notifications to certain methods */ - function getNotificationTypes($languageCode); + public function getNotificationTypes($languageCode); /** * @param string $method * @return array * @since 8.0.0 */ - function getDefaultTypes($method); + public function getDefaultTypes($method); /** * @param string $type * @return string * @since 8.0.0 */ - function getTypeIcon($type); + public function getTypeIcon($type); /** * @param string $app @@ -117,7 +120,7 @@ interface IManager { * @return string|false * @since 8.0.0 */ - function translate($app, $text, $params, $stripPath, $highlightParams, $languageCode); + public function translate($app, $text, $params, $stripPath, $highlightParams, $languageCode); /** * @param string $app @@ -125,27 +128,27 @@ interface IManager { * @return array|false * @since 8.0.0 */ - function getSpecialParameterList($app, $text); + public function getSpecialParameterList($app, $text); /** * @param array $activity * @return integer|false * @since 8.0.0 */ - function getGroupParameter($activity); + public function getGroupParameter($activity); /** * @return array * @since 8.0.0 */ - function getNavigation(); + public function getNavigation(); /** * @param string $filterValue * @return boolean * @since 8.0.0 */ - function isFilterValid($filterValue); + public function isFilterValid($filterValue); /** * @param array $types @@ -153,14 +156,14 @@ interface IManager { * @return array * @since 8.0.0 */ - function filterNotificationTypes($types, $filter); + public function filterNotificationTypes($types, $filter); /** * @param string $filter * @return array * @since 8.0.0 */ - function getQueryForFilter($filter); + public function getQueryForFilter($filter); /** * Get the user we need to use |