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 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()
- 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 consumers
Make sure to call at least the following methods before sending an Event:
- setApp()
- setType()
- setAffectedUser()
- setSubject()
- setObject()
Source:

lib/public/Activity/IManager.php#68

Parameters:
Throws:

\BadMethodCallException if required values have not been set

Since:

8.2.0

public OCP\Activity\IManager::registerConsumer($callable)
In order to improve lazy loading a closure can be registered which will be called in case
activity consumers are actually requested
$callable has to return an instance of \OCP\Activity\IConsumer
Source:

lib/public/Activity/IManager.php#79

Parameters:
  • $callable (Closure)
Since:

6.0.0

public OCP\Activity\IManager::registerFilter($filter)
Source:

lib/public/Activity/IManager.php#85

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:

lib/public/Activity/IManager.php#99

Parameters:
  • $id (string)
Returns:

\OCP\Activity\IFilter

Throws:

\InvalidArgumentException when the filter was not found

Since:

11.0.0

public OCP\Activity\IManager::registerSetting($setting)
Source:

lib/public/Activity/IManager.php#105

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:

lib/public/Activity/IManager.php#117

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:

lib/public/Activity/IManager.php#131

Parameters:
  • $id (string)
Returns:

\OCP\Activity\ActivitySettings

Throws:

\InvalidArgumentException when the setting was not found

Since:

11.0.0

public OCP\Activity\IManager::setFormattingObject($type, $id)
Source:

lib/public/Activity/IManager.php#138

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:

lib/public/Activity/IManager.php#150

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:

lib/public/Activity/IManager.php#165

Parameters:
  • $currentUserId (string | null)
Throws:

\UnexpectedValueException If the user is invalid

Since:

9.0.1

public OCP\Activity\IManager::getCurrentUserId()
Get the user we need to use
Either 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 unique
Since:8.1.0