IManager
in
Interface IManager
Tags
Table of Contents
Methods
- generateEvent() : IEvent
- Generates a new IEvent object
- getCurrentUserId() : string
- Get the user we need to use
- getFilterById() : IFilter
- getFilters() : array<string|int, IFilter>
- getProviders() : array<string|int, IProvider>
- getRequirePNG() : bool
- getSettingById() : ActivitySettings
- getSettings() : array<string|int, ActivitySettings>
- isFormattingFilteredObject() : bool
- publish() : void
- Publish an event to the activity consumers
- registerConsumer() : void
- In order to improve lazy loading a closure can be registered which will be called in case activity consumers are actually requested
- registerFilter() : void
- registerProvider() : void
- registerSetting() : void
- setCurrentUserId() : void
- Set the user we need to use
- setFormattingObject() : void
- setRequirePNG() : void
Methods
generateEvent()
Generates a new IEvent object
public
generateEvent() : IEvent
Make sure to call at least the following methods before sending it to the app with via the publish() method:
- setApp()
- setType()
- setAffectedUser()
- setSubject()
- setObject()
Tags
Return values
IEventgetCurrentUserId()
Get the user we need to use
public
getCurrentUserId() : string
Either the user is logged in, or we try to get it from the token
Tags
Return values
stringgetFilterById()
public
getFilterById(string $id) : IFilter
Parameters
- $id : string
Tags
Return values
IFiltergetFilters()
public
getFilters() : array<string|int, IFilter>
Tags
Return values
array<string|int, IFilter>getProviders()
public
getProviders() : array<string|int, IProvider>
Tags
Return values
array<string|int, IProvider>getRequirePNG()
public
getRequirePNG() : bool
Tags
Return values
boolgetSettingById()
public
getSettingById(string $id) : ActivitySettings
Parameters
- $id : string
Tags
Return values
ActivitySettingsgetSettings()
public
getSettings() : array<string|int, ActivitySettings>
Tags
Return values
array<string|int, ActivitySettings>isFormattingFilteredObject()
public
isFormattingFilteredObject() : bool
Tags
Return values
boolpublish()
Publish an event to the activity consumers
public
publish(IEvent $event) : void
Make sure to call at least the following methods before sending an Event:
- setApp()
- setType()
- setAffectedUser()
- setSubject()
- setObject()
Parameters
- $event : IEvent
Tags
registerConsumer()
In order to improve lazy loading a closure can be registered which will be called in case activity consumers are actually requested
public
registerConsumer(Closure $callable) : void
$callable has to return an instance of \OCP\Activity\IConsumer
Parameters
- $callable : Closure
Tags
registerFilter()
public
registerFilter(string $filter) : void
Parameters
- $filter : string
-
Class must implement OCA\Activity\IFilter
Tags
registerProvider()
public
registerProvider(string $provider) : void
Parameters
- $provider : string
-
Class must implement OCA\Activity\IProvider
Tags
registerSetting()
public
registerSetting(string $setting) : void
Parameters
- $setting : string
-
Class must implement OCA\Activity\ISetting
Tags
setCurrentUserId()
Set the user we need to use
public
setCurrentUserId([string|null $currentUserId = null ]) : void
Parameters
- $currentUserId : string|null = null
Tags
setFormattingObject()
public
setFormattingObject(string $type, int $id) : void
Parameters
- $type : string
- $id : int
Tags
setRequirePNG()
public
setRequirePNG(bool $status) : void
Parameters
- $status : bool
-
Set to true, when parsing events should not use SVG icons