IEvent

interface OCP\Activity\IEvent
Interface IEvent
Implemented by:OC\Activity\Event
Source:lib/public/Activity/IEvent.php#44

Methods

public OCP\Activity\IEvent::setApp($app)
Set the app of the activity
Source:

lib/public/Activity/IEvent.php#53

Parameters:
  • $app (string)
Returns:

\OCP\Activity\IEvent

Throws:

\InvalidArgumentException if the app id is invalid

Since:

8.2.0

public OCP\Activity\IEvent::setType($type)
Set the type of the activity
Source:

lib/public/Activity/IEvent.php#63

Parameters:
  • $type (string)
Returns:

\OCP\Activity\IEvent

Throws:

\InvalidArgumentException if the type is invalid

Since:

8.2.0

public OCP\Activity\IEvent::setAffectedUser($user)
Set the affected user of the activity
Source:

lib/public/Activity/IEvent.php#73

Parameters:
  • $user (string)
Returns:

\OCP\Activity\IEvent

Throws:

\InvalidArgumentException if the affected user is invalid

Since:

8.2.0

public OCP\Activity\IEvent::setAuthor($author)
Set the author of the activity
Source:

lib/public/Activity/IEvent.php#83

Parameters:
  • $author (string)
Returns:

\OCP\Activity\IEvent

Throws:

\InvalidArgumentException if the author is invalid

Since:

8.2.0

public OCP\Activity\IEvent::setTimestamp($timestamp)
Set the author of the activity
Source:

lib/public/Activity/IEvent.php#93

Parameters:
  • $timestamp (int)
Returns:

\OCP\Activity\IEvent

Throws:

\InvalidArgumentException if the timestamp is invalid

Since:

8.2.0

public OCP\Activity\IEvent::setSubject($subject, $parameters=[])
Set the subject of the activity
Source:

lib/public/Activity/IEvent.php#104

Parameters:
  • $subject (string)
  • $parameters (array)
Returns:

\OCP\Activity\IEvent

Throws:

\InvalidArgumentException if the subject or parameters are invalid

Since:

8.2.0

public OCP\Activity\IEvent::setParsedSubject($subject)
Set a parsed subject
HTML is not allowed in the parsed subject and will be escaped
automatically by the clients. You can use the RichObjectString system
provided by the Nextcloud server to highlight important parameters via
the setRichSubject method, but make sure, that a plain text message is
always set via setParsedSubject, to support clients which can not handle
rich strings.

Source:

lib/public/Activity/IEvent.php#123

Parameters:
  • $subject (string)
Returns:

$this

Throws:

\InvalidArgumentException if the subject is invalid

Since:

11.0.0

public OCP\Activity\IEvent::getParsedSubject()
Source:lib/public/Activity/IEvent.php#129
Returns:string
Since:11.0.0
public OCP\Activity\IEvent::setRichSubject($subject, $parameters=[])
Set a RichObjectString subject
HTML is not allowed in the rich subject and will be escaped automatically
by the clients, but you can use the RichObjectString system provided by
the Nextcloud server to highlight important parameters.
Also make sure, that a plain text subject is always set via
setParsedSubject, to support clients which can not handle rich strings.

Source:

lib/public/Activity/IEvent.php#148

Parameters:
  • $subject (string)
  • $parameters (array)
Returns:

$this

Throws:

\InvalidArgumentException if the subject or parameters are invalid

Since:

11.0.0

public OCP\Activity\IEvent::getRichSubject()
Source:lib/public/Activity/IEvent.php#154
Returns:string
Since:11.0.0
public OCP\Activity\IEvent::getRichSubjectParameters()
Source:lib/public/Activity/IEvent.php#160
Returns:array[]
Since:11.0.0
public OCP\Activity\IEvent::setMessage($message, $parameters=[])
Set the message of the activity
Source:

lib/public/Activity/IEvent.php#171

Parameters:
  • $message (string)
  • $parameters (array)
Returns:

\OCP\Activity\IEvent

Throws:

\InvalidArgumentException if the message or parameters are invalid

Since:

8.2.0

public OCP\Activity\IEvent::setParsedMessage($message)
Set a parsed message
HTML is not allowed in the parsed message and will be escaped
automatically by the clients. You can use the RichObjectString system
provided by the Nextcloud server to highlight important parameters via
the setRichMessage method, but make sure, that a plain text message is
always set via setParsedMessage, to support clients which can not handle
rich strings.

Source:

lib/public/Activity/IEvent.php#190

Parameters:
  • $message (string)
Returns:

$this

Throws:

\InvalidArgumentException if the message is invalid

Since:

11.0.0

public OCP\Activity\IEvent::getParsedMessage()
Source:lib/public/Activity/IEvent.php#196
Returns:string
Since:11.0.0
public OCP\Activity\IEvent::setRichMessage($message, $parameters=[])
Set a RichObjectString message
HTML is not allowed in the rich message and will be escaped automatically
by the clients, but you can use the RichObjectString system provided by
the Nextcloud server to highlight important parameters.
Also make sure, that a plain text message is always set via
setParsedMessage, to support clients which can not handle rich strings.

Source:

lib/public/Activity/IEvent.php#215

Parameters:
  • $message (string)
  • $parameters (array)
Returns:

$this

Throws:

\InvalidArgumentException if the message or parameters are invalid

Since:

11.0.0

public OCP\Activity\IEvent::getRichMessage()
Source:lib/public/Activity/IEvent.php#221
Returns:string
Since:11.0.0
public OCP\Activity\IEvent::getRichMessageParameters()
Source:lib/public/Activity/IEvent.php#227
Returns:array[]
Since:11.0.0
public OCP\Activity\IEvent::setObject($objectType, $objectId, $objectName="")
Set the object of the activity
Source:

lib/public/Activity/IEvent.php#239

Parameters:
  • $objectType (string)
  • $objectId (int)
  • $objectName (string)
Returns:

\OCP\Activity\IEvent

Throws:

\InvalidArgumentException if the object is invalid

Since:

8.2.0

Set the link of the activity
Source:

lib/public/Activity/IEvent.php#249

Parameters:
  • $link (string)
Returns:

\OCP\Activity\IEvent

Throws:

\InvalidArgumentException if the link is invalid

Since:

8.2.0

public OCP\Activity\IEvent::getApp()
Source:lib/public/Activity/IEvent.php#255
Returns:string
Since:8.2.0
public OCP\Activity\IEvent::getType()
Source:lib/public/Activity/IEvent.php#261
Returns:string
Since:8.2.0
public OCP\Activity\IEvent::getAffectedUser()
Source:lib/public/Activity/IEvent.php#267
Returns:string
Since:8.2.0
public OCP\Activity\IEvent::getAuthor()
Source:lib/public/Activity/IEvent.php#273
Returns:string
Since:8.2.0
public OCP\Activity\IEvent::getTimestamp()
Source:lib/public/Activity/IEvent.php#279
Returns:int
Since:8.2.0
public OCP\Activity\IEvent::getSubject()
Source:lib/public/Activity/IEvent.php#285
Returns:string
Since:8.2.0
public OCP\Activity\IEvent::getSubjectParameters()
Source:lib/public/Activity/IEvent.php#291
Returns:array
Since:8.2.0
public OCP\Activity\IEvent::getMessage()
Source:lib/public/Activity/IEvent.php#297
Returns:string
Since:8.2.0
public OCP\Activity\IEvent::getMessageParameters()
Source:lib/public/Activity/IEvent.php#303
Returns:array
Since:8.2.0
public OCP\Activity\IEvent::getObjectType()
Source:lib/public/Activity/IEvent.php#309
Returns:string
Since:8.2.0
public OCP\Activity\IEvent::getObjectId()
Source:lib/public/Activity/IEvent.php#315
Returns:int
Since:8.2.0
public OCP\Activity\IEvent::getObjectName()
Source:lib/public/Activity/IEvent.php#321
Returns:string
Since:8.2.0
Source:lib/public/Activity/IEvent.php#327
Returns:string
Since:8.2.0
public OCP\Activity\IEvent::setIcon($icon)
Source:

lib/public/Activity/IEvent.php#335

Parameters:
  • $icon (string)
Returns:

$this

Throws:

\InvalidArgumentException if the icon is invalid

Since:

11.0.0

public OCP\Activity\IEvent::getIcon()
Source:lib/public/Activity/IEvent.php#341
Returns:string
Since:11.0.0
public OCP\Activity\IEvent::setChildEvent($child)
Source:

lib/public/Activity/IEvent.php#348

Parameters:
Returns:

$this

Since:

11.0.0 - Since 15.0.0 returns $this

public OCP\Activity\IEvent::getChildEvent()
Source:lib/public/Activity/IEvent.php#354
Returns:\OCP\Activity\IEvent | null
Since:11.0.0
public OCP\Activity\IEvent::isValid()
Source:lib/public/Activity/IEvent.php#360
Returns:bool
Since:11.0.0
public OCP\Activity\IEvent::isValidParsed()
Source:lib/public/Activity/IEvent.php#366
Returns:bool
Since:11.0.0
public OCP\Activity\IEvent::setGenerateNotification($generate)
Set whether or not a notification should be automatically generated for this activity.
Set this to `false` if the app already generates a notification for the event.
Source:

lib/public/Activity/IEvent.php#377

Parameters:
  • $generate (bool)
Returns:

\OCP\Activity\IEvent

Since:

20.0.0

public OCP\Activity\IEvent::getGenerateNotification()
whether or not a notification should be automatically generated for this activity.
Source:lib/public/Activity/IEvent.php#385
Returns:bool
Since:20.0.0