Event

class OC\Activity\Event
Source:lib/private/Activity/Event.php#36
Implements:OCP\Activity\IEvent

Properties

protected static property OC\Activity\Event::$app
Source:lib/private/Activity/Event.php#39
Type:string
protected static property OC\Activity\Event::$type
Source:lib/private/Activity/Event.php#41
Type:string
protected static property OC\Activity\Event::$affectedUser
Source:lib/private/Activity/Event.php#43
Type:string
protected static property OC\Activity\Event::$author
Source:lib/private/Activity/Event.php#45
Type:string
protected static property OC\Activity\Event::$timestamp
Source:lib/private/Activity/Event.php#47
Type:int
protected static property OC\Activity\Event::$subject
Source:lib/private/Activity/Event.php#49
Type:string
protected static property OC\Activity\Event::$subjectParameters
Source:lib/private/Activity/Event.php#51
Type:array
protected static property OC\Activity\Event::$subjectParsed
Source:lib/private/Activity/Event.php#53
Type:string
protected static property OC\Activity\Event::$subjectRich
Source:lib/private/Activity/Event.php#55
Type:string
protected static property OC\Activity\Event::$subjectRichParameters
Source:lib/private/Activity/Event.php#57
Type:array
protected static property OC\Activity\Event::$message
Source:lib/private/Activity/Event.php#59
Type:string
protected static property OC\Activity\Event::$messageParameters
Source:lib/private/Activity/Event.php#61
Type:array
protected static property OC\Activity\Event::$messageParsed
Source:lib/private/Activity/Event.php#63
Type:string
protected static property OC\Activity\Event::$messageRich
Source:lib/private/Activity/Event.php#65
Type:string
protected static property OC\Activity\Event::$messageRichParameters
Source:lib/private/Activity/Event.php#67
Type:array
protected static property OC\Activity\Event::$objectType
Source:lib/private/Activity/Event.php#69
Type:string
protected static property OC\Activity\Event::$objectId
Source:lib/private/Activity/Event.php#71
Type:int
protected static property OC\Activity\Event::$objectName
Source:lib/private/Activity/Event.php#73
Type:string
Source:lib/private/Activity/Event.php#75
Type:string
protected static property OC\Activity\Event::$icon
Source:lib/private/Activity/Event.php#77
Type:string
protected static property OC\Activity\Event::$generateNotification
Source:lib/private/Activity/Event.php#79
Type:bool
protected static property OC\Activity\Event::$child
Source:lib/private/Activity/Event.php#82
Type:\OCP\Activity\IEvent | null
protected static property OC\Activity\Event::$richValidator
Source:lib/private/Activity/Event.php#84
Type:\OCP\RichObjectStrings\IValidator

Methods

public OC\Activity\Event::__construct($richValidator)
Source:

lib/private/Activity/Event.php#89

Parameters:
public OC\Activity\Event::setApp($app)
Set the app of the activity
Source:

lib/private/Activity/Event.php#101

Parameters:
  • $app (string)
Returns:

\OCP\Activity\IEvent

Throws:

\InvalidArgumentException if the app id is invalid

Since:

8.2.0

public OC\Activity\Event::getApp()
Source:lib/private/Activity/Event.php#112
Returns:string
public OC\Activity\Event::setType($type)
Set the type of the activity
Source:

lib/private/Activity/Event.php#124

Parameters:
  • $type (string)
Returns:

\OCP\Activity\IEvent

Throws:

\InvalidArgumentException if the type is invalid

Since:

8.2.0

public OC\Activity\Event::getType()
Source:lib/private/Activity/Event.php#135
Returns:string
public OC\Activity\Event::setAffectedUser($affectedUser)
Set the affected user of the activity
Source:

lib/private/Activity/Event.php#147

Parameters:
  • $affectedUser (string)
Returns:

\OCP\Activity\IEvent

Throws:

\InvalidArgumentException if the affected user is invalid

Since:

8.2.0

public OC\Activity\Event::getAffectedUser()
Source:lib/private/Activity/Event.php#158
Returns:string
public OC\Activity\Event::setAuthor($author)
Set the author of the activity
Source:

lib/private/Activity/Event.php#170

Parameters:
  • $author (string)
Returns:

\OCP\Activity\IEvent

Throws:

\InvalidArgumentException if the author is invalid

Since:

8.2.0

public OC\Activity\Event::getAuthor()
Source:lib/private/Activity/Event.php#181
Returns:string
public OC\Activity\Event::setTimestamp($timestamp)
Set the timestamp of the activity
Source:

lib/private/Activity/Event.php#193

Parameters:
  • $timestamp (int)
Returns:

\OCP\Activity\IEvent

Throws:

\InvalidArgumentException if the timestamp is invalid

Since:

8.2.0

public OC\Activity\Event::getTimestamp()
Source:lib/private/Activity/Event.php#201
Returns:int
public OC\Activity\Event::setSubject($subject, $parameters=[])
Set the subject of the activity
Source:

lib/private/Activity/Event.php#214

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

\OCP\Activity\IEvent

Throws:

\InvalidArgumentException if the subject or parameters are invalid

Since:

8.2.0

public OC\Activity\Event::getSubject()
Source:lib/private/Activity/Event.php#226
Returns:string
public OC\Activity\Event::getSubjectParameters()
Source:lib/private/Activity/Event.php#233
Returns:array
public OC\Activity\Event::setParsedSubject($subject)
Source:

lib/private/Activity/Event.php#243

Parameters:
  • $subject (string)
Returns:

$this

Throws:

\InvalidArgumentException if the subject is invalid

Since:

11.0.0

public OC\Activity\Event::getParsedSubject()
Source:lib/private/Activity/Event.php#255
Returns:string
Since:11.0.0
public OC\Activity\Event::setRichSubject($subject, $parameters=[])
Source:

lib/private/Activity/Event.php#266

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

$this

Throws:

\InvalidArgumentException if the subject or parameters are invalid

Since:

11.0.0

public OC\Activity\Event::getRichSubject()
Source:lib/private/Activity/Event.php#280
Returns:string
Since:11.0.0
public OC\Activity\Event::getRichSubjectParameters()
Source:lib/private/Activity/Event.php#288
Returns:array[]
Since:11.0.0
public OC\Activity\Event::setMessage($message, $parameters=[])
Set the message of the activity
Source:

lib/private/Activity/Event.php#301

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

\OCP\Activity\IEvent

Throws:

\InvalidArgumentException if the message or parameters are invalid

Since:

8.2.0

public OC\Activity\Event::getMessage()
Source:lib/private/Activity/Event.php#313
Returns:string
public OC\Activity\Event::getMessageParameters()
Source:lib/private/Activity/Event.php#320
Returns:array
public OC\Activity\Event::setParsedMessage($message)
Source:

lib/private/Activity/Event.php#330

Parameters:
  • $message (string)
Returns:

$this

Throws:

\InvalidArgumentException if the message is invalid

Since:

11.0.0

public OC\Activity\Event::getParsedMessage()
Source:lib/private/Activity/Event.php#339
Returns:string
Since:11.0.0
public OC\Activity\Event::setRichMessage($message, $parameters=[])
Source:

lib/private/Activity/Event.php#350

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

$this

Throws:

\InvalidArgumentException if the subject or parameters are invalid

Since:

11.0.0

public OC\Activity\Event::getRichMessage()
Source:lib/private/Activity/Event.php#361
Returns:string
Since:11.0.0
public OC\Activity\Event::getRichMessageParameters()
Source:lib/private/Activity/Event.php#369
Returns:array[]
Since:11.0.0
public OC\Activity\Event::setObject($objectType, $objectId, $objectName="")
Set the object of the activity
Source:

lib/private/Activity/Event.php#383

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

\OCP\Activity\IEvent

Throws:

\InvalidArgumentException if the object is invalid

Since:

8.2.0

public OC\Activity\Event::getObjectType()
Source:lib/private/Activity/Event.php#399
Returns:string
public OC\Activity\Event::getObjectId()
Source:lib/private/Activity/Event.php#406
Returns:int
public OC\Activity\Event::getObjectName()
Source:lib/private/Activity/Event.php#413
Returns:string
Set the link of the activity
Source:

lib/private/Activity/Event.php#425

Parameters:
  • $link (string)
Returns:

\OCP\Activity\IEvent

Throws:

\InvalidArgumentException if the link is invalid

Since:

8.2.0

Source:lib/private/Activity/Event.php#436
Returns:string
public OC\Activity\Event::setIcon($icon)
Source:

lib/private/Activity/Event.php#446

Parameters:
  • $icon (string)
Returns:

$this

Throws:

\InvalidArgumentException if the icon is invalid

Since:

11.0.0

public OC\Activity\Event::getIcon()
Source:lib/private/Activity/Event.php#458
Returns:string
Since:11.0.0
public OC\Activity\Event::setChildEvent($child)
Source:

lib/private/Activity/Event.php#467

Parameters:
Returns:

$this

Since:

11.0.0 - Since 15.0.0 returns $this

public OC\Activity\Event::getChildEvent()
Source:lib/private/Activity/Event.php#476
Returns:\OCP\Activity\IEvent | null
Since:11.0.0
public OC\Activity\Event::isValid()
Source:lib/private/Activity/Event.php#484
Returns:bool
Since:8.2.0
public OC\Activity\Event::isValidParsed()
Source:lib/private/Activity/Event.php#496
Returns:bool
Since:8.2.0
protected OC\Activity\Event::isValidCommon()
Source:lib/private/Activity/Event.php#520
public OC\Activity\Event::setGenerateNotification($generate)
Source:lib/private/Activity/Event.php#539
public OC\Activity\Event::getGenerateNotification()
Source:lib/private/Activity/Event.php#544