IManager
Interface IManager
Tags
Table of Contents
- generateEvent() : IEvent
- Generates a new IEvent object
- getCurrentUserId() : string
- Get the user we need to use
- getFilterById() : IFilter
- getFilters() : \OCP\Activity\IFilter[]
- getProviders() : \OCP\Activity\IProvider[]
- getRequirePNG() : bool
- getSettingById() : ISetting
- getSettings() : \OCP\Activity\ISetting[]
- 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()
Tags
Return values
IEvent —getCurrentUserId()
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
string —getFilterById()
public
getFilterById(string $id) : IFilter
Parameters
- $id : string
Tags
Return values
IFilter —getFilters()
public
getFilters() : \OCP\Activity\IFilter[]
Tags
Return values
\OCP\Activity\IFilter[] —getProviders()
public
getProviders() : \OCP\Activity\IProvider[]
Tags
Return values
\OCP\Activity\IProvider[] —getRequirePNG()
public
getRequirePNG() : bool
Tags
Return values
bool —getSettingById()
public
getSettingById(string $id) : ISetting
Parameters
- $id : string
Tags
Return values
ISetting —getSettings()
public
getSettings() : \OCP\Activity\ISetting[]
Tags
Return values
\OCP\Activity\ISetting[] —isFormattingFilteredObject()
public
isFormattingFilteredObject() : bool
Tags
Return values
bool —publish()
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()
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