IManager¶
-
interface
OCP\Activity\
IManager
¶ - Interface IManager
Implemented by: OC\Activity\Manager
Source: lib/public/Activity/IManager.php#37
Methods¶
-
public
OCP\Activity\IManager::
generateEvent
()¶ - Generates a new IEvent objectMake sure to call at least the following methods before sending it to theapp with via the publish() method:- setApp()- setType()- setAffectedUser()- setSubject()- setObject()
Source: lib/public/Activity/IManager.php#52 Returns: \OCP\Activity\IEvent
Since: 8.2.0
-
public
OCP\Activity\IManager::
publish
($event)¶ - Publish an event to the activity consumersMake sure to call at least the following methods before sending an Event:- setApp()- setType()- setAffectedUser()- setSubject()- setObject()
Source: Parameters: - $event (
OCP\Activity\IEvent
)
Throws: \BadMethodCallException
if required values have not been setSince: 8.2.0
- $event (
-
public
OCP\Activity\IManager::
registerConsumer
($callable)¶ - In order to improve lazy loading a closure can be registered which will be called in caseactivity consumers are actually requested$callable has to return an instance of \OCP\Activity\IConsumer
Source: Parameters: - $callable (
Closure
)
Since: 6.0.0
- $callable (
-
public
OCP\Activity\IManager::
registerFilter
($filter)¶ Source: Parameters: - $filter (string) Class must implement OCAActivityIFilter
Since: 11.0.0
-
public
OCP\Activity\IManager::
getFilters
()¶ Source: lib/public/Activity/IManager.php#91 Returns: \OCP\Activity\IFilter[]
Since: 11.0.0
-
public
OCP\Activity\IManager::
getFilterById
($id)¶ Source: Parameters: - $id (string)
Returns: Throws: \InvalidArgumentException
when the filter was not foundSince: 11.0.0
-
public
OCP\Activity\IManager::
registerSetting
($setting)¶ Source: Parameters: - $setting (string) Class must implement OCAActivityISetting
Since: 11.0.0
-
public
OCP\Activity\IManager::
getSettings
()¶ Source: lib/public/Activity/IManager.php#111 Returns: \OCP\Activity\ActivitySettings[]
Since: 11.0.0
-
public
OCP\Activity\IManager::
registerProvider
($provider)¶ Source: Parameters: - $provider (string) Class must implement OCAActivityIProvider
Since: 11.0.0
-
public
OCP\Activity\IManager::
getProviders
()¶ Source: lib/public/Activity/IManager.php#123 Returns: \OCP\Activity\IProvider[]
Since: 11.0.0
-
public
OCP\Activity\IManager::
getSettingById
($id)¶ Source: Parameters: - $id (string)
Returns: Throws: \InvalidArgumentException
when the setting was not foundSince: 11.0.0
-
public
OCP\Activity\IManager::
setFormattingObject
($type, $id)¶ Source: Parameters: - $type (string)
- $id (int)
Since: 8.2.0
-
public
OCP\Activity\IManager::
isFormattingFilteredObject
()¶ Source: lib/public/Activity/IManager.php#144 Returns: bool Since: 8.2.0
-
public
OCP\Activity\IManager::
setRequirePNG
($status)¶ Source: Parameters: - $status (bool) Set to true, when parsing events should not use SVG icons
Since: 12.0.1
-
public
OCP\Activity\IManager::
getRequirePNG
()¶ Source: lib/public/Activity/IManager.php#156 Returns: bool Since: 12.0.1
-
public
OCP\Activity\IManager::
setCurrentUserId
($currentUserId=null)¶ - Set the user we need to use
Source: Parameters: - $currentUserId (string | null)
Throws: \UnexpectedValueException
If the user is invalidSince: 9.0.1
-
public
OCP\Activity\IManager::
getCurrentUserId
()¶ - Get the user we need to useEither the user is logged in, or we try to get it from the token
Source: lib/public/Activity/IManager.php#176 Returns: string Throws: \UnexpectedValueException
If the token is invalid, does not exist or is not uniqueSince: 8.1.0