Nextcloud PHP API (master)

IEvent

Interface IEvent

Tags
since
8.2.0

Table of Contents

Methods

getAffectedUser()  : string
getApp()  : string
getAuthor()  : string
getChildEvent()  : IEvent|null
getGenerateNotification()  : bool
Whether a notification should be automatically generated for this activity.
getIcon()  : string
Get the absolute url for the icon (should be colored black or not have a color)
getLink()  : string
getMessage()  : string
getMessageParameters()  : array<string|int, mixed>
getObjectId()  : int
getObjectName()  : string
getObjectType()  : string
getParsedMessage()  : string
getParsedSubject()  : string
getRichMessage()  : string
getRichMessageParameters()  : array<string, array<string, string>>
getRichSubject()  : string
getRichSubjectParameters()  : array<string, array<string, string>>
getSubject()  : string
getSubjectParameters()  : array<string|int, mixed>
getTimestamp()  : int
getType()  : string
isValid()  : bool
isValidParsed()  : bool
setAffectedUser()  : IEvent
Set the affected user of the activity
setApp()  : IEvent
Set the app of the activity
setAuthor()  : IEvent
Set the author of the activity
setChildEvent()  : $this
setGenerateNotification()  : IEvent
Set whether a notification should be automatically generated for this activity.
setIcon()  : $this
Set the absolute url for the icon (should be colored black or not have a color)
setLink()  : IEvent
Set the link of the activity
setMessage()  : IEvent
Set the message of the activity
setObject()  : IEvent
Set the object of the activity
setParsedMessage()  : $this
Set a parsed message
setParsedSubject()  : $this
Set a parsed subject
setRichMessage()  : $this
Set a RichObjectString message
setRichSubject()  : $this
Set a RichObjectString subject
setSubject()  : IEvent
Set the subject of the activity
setTimestamp()  : IEvent
Set the author of the activity
setType()  : IEvent
Set the type of the activity

Methods

getAffectedUser()

public getAffectedUser() : string
Tags
since
8.2.0
Return values
string

getApp()

public getApp() : string
Tags
since
8.2.0
Return values
string

getAuthor()

public getAuthor() : string
Tags
since
8.2.0
Return values
string

getChildEvent()

public getChildEvent() : IEvent|null
Tags
since
11.0.0
Return values
IEvent|null

getGenerateNotification()

Whether a notification should be automatically generated for this activity.

public getGenerateNotification() : bool
Tags
since
20.0.0
Return values
bool

getIcon()

Get the absolute url for the icon (should be colored black or not have a color)

public getIcon() : string

It's automatically color inverted by clients when needed

Tags
since
11.0.0
Return values
string
public getLink() : string
Tags
since
8.2.0
Return values
string

getMessage()

public getMessage() : string
Tags
since
8.2.0
Return values
string

getMessageParameters()

public getMessageParameters() : array<string|int, mixed>
Tags
since
8.2.0
Return values
array<string|int, mixed>

getObjectId()

public getObjectId() : int
Tags
since
8.2.0
Return values
int

getObjectName()

public getObjectName() : string
Tags
since
8.2.0
Return values
string

getObjectType()

public getObjectType() : string
Tags
since
8.2.0
Return values
string

getParsedMessage()

public getParsedMessage() : string
Tags
since
11.0.0
Return values
string

getParsedSubject()

public getParsedSubject() : string
Tags
since
11.0.0
Return values
string

getRichMessage()

public getRichMessage() : string
Tags
since
11.0.0
Return values
string

getRichMessageParameters()

public getRichMessageParameters() : array<string, array<string, string>>
Tags
since
11.0.0
Return values
array<string, array<string, string>>

getRichSubject()

public getRichSubject() : string
Tags
since
11.0.0
Return values
string

getRichSubjectParameters()

public getRichSubjectParameters() : array<string, array<string, string>>
Tags
since
11.0.0
Return values
array<string, array<string, string>>

getSubject()

public getSubject() : string
Tags
since
8.2.0
Return values
string

getSubjectParameters()

public getSubjectParameters() : array<string|int, mixed>
Tags
since
8.2.0
Return values
array<string|int, mixed>

getTimestamp()

public getTimestamp() : int
Tags
since
8.2.0
Return values
int

getType()

public getType() : string
Tags
since
8.2.0
Return values
string

isValid()

public isValid() : bool
Tags
since
11.0.0
Return values
bool

isValidParsed()

public isValidParsed() : bool
Tags
since
11.0.0
Return values
bool

setAffectedUser()

Set the affected user of the activity

public setAffectedUser(string $affectedUser) : IEvent
Parameters
$affectedUser : string
Tags
throws
InvalidValueException

if the affected user is invalid

since
8.2.0
since
30.0.0

throws InvalidValueException instead of \InvalidArgumentException

Return values
IEvent

setChildEvent()

public setChildEvent(IEvent $child) : $this
Parameters
$child : IEvent
Tags
since
11.0.0
  • Since 15.0.0 returns $this
Return values
$this

setGenerateNotification()

Set whether a notification should be automatically generated for this activity.

public setGenerateNotification(bool $generate) : IEvent

Set this to false if the app already generates a notification for the event.

Parameters
$generate : bool
Tags
since
20.0.0
Return values
IEvent

setIcon()

Set the absolute url for the icon (should be colored black or not have a color)

public setIcon(string $icon) : $this

It's automatically color inverted by clients when needed

Parameters
$icon : string
Tags
throws
InvalidValueException

if the icon is invalid

since
11.0.0
since
30.0.0

throws InvalidValueException instead of \InvalidArgumentException

Return values
$this

setMessage()

Set the message of the activity

public setMessage(string $message[, array<string|int, mixed> $parameters = [] ]) : IEvent
Parameters
$message : string
$parameters : array<string|int, mixed> = []
Tags
throws
InvalidValueException

if the message or parameters are invalid

since
8.2.0
since
30.0.0

throws InvalidValueException instead of \InvalidArgumentException

Return values
IEvent

setObject()

Set the object of the activity

public setObject(string $objectType, int $objectId[, string $objectName = '' ]) : IEvent
Parameters
$objectType : string
$objectId : int
$objectName : string = ''
Tags
throws
InvalidValueException

if the object is invalid

since
8.2.0
since
30.0.0

throws InvalidValueException instead of \InvalidArgumentException

Return values
IEvent

setParsedMessage()

Set a parsed message

public setParsedMessage(string $message) : $this

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.

See https://github.com/nextcloud/server/issues/1706 for more information.

Parameters
$message : string
Tags
throws
InvalidValueException

if the message is invalid

since
11.0.0
since
30.0.0

throws InvalidValueException instead of \InvalidArgumentException

Return values
$this

setParsedSubject()

Set a parsed subject

public setParsedSubject(string $subject) : $this

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.

See https://github.com/nextcloud/server/issues/1706 for more information.

Parameters
$subject : string
Tags
throws
InvalidValueException

if the subject is invalid

since
11.0.0
since
30.0.0

throws InvalidValueException instead of \InvalidArgumentException

Return values
$this

setRichMessage()

Set a RichObjectString message

public setRichMessage(string $message[, array<string, array<string, string>> $parameters = [] ]) : $this

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.

See https://github.com/nextcloud/server/issues/1706 for more information.

Parameters
$message : string
$parameters : array<string, array<string, string>> = []
Tags
throws
InvalidArgumentException

if the message or parameters are invalid

since
11.0.0
since
30.0.0

throws InvalidValueException instead of \InvalidArgumentException

Return values
$this

setRichSubject()

Set a RichObjectString subject

public setRichSubject(string $subject[, array<string, array<string, string>> $parameters = [] ]) : $this

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.

See https://github.com/nextcloud/server/issues/1706 for more information.

Parameters
$subject : string
$parameters : array<string, array<string, string>> = []
Tags
throws
InvalidValueException

if the subject or parameters are invalid

since
11.0.0
since
30.0.0

throws InvalidValueException instead of \InvalidArgumentException

Return values
$this

setSubject()

Set the subject of the activity

public setSubject(string $subject[, array<string|int, mixed> $parameters = [] ]) : IEvent
Parameters
$subject : string
$parameters : array<string|int, mixed> = []
Tags
throws
InvalidValueException

if the subject or parameters are invalid

since
8.2.0
since
30.0.0

throws InvalidValueException instead of \InvalidArgumentException

Return values
IEvent

        
On this page

Search results