Nextcloud PHP API (stable19)

INotification

Interface INotification

Tags
since
9.0.0

Table of Contents

addAction()  : $this
addParsedAction()  : $this
createAction()  : IAction
getActions()  : \OCP\Notification\IAction[]
getApp()  : string
getDateTime()  : DateTime
getIcon()  : string
getLink()  : string
getMessage()  : string
getMessageParameters()  : array
getObjectId()  : string
getObjectType()  : string
getParsedActions()  : \OCP\Notification\IAction[]
getParsedMessage()  : string
getParsedSubject()  : string
getRichMessage()  : string
getRichMessageParameters()  : array[]
getRichSubject()  : string
getRichSubjectParameters()  : array[]
getSubject()  : string
getSubjectParameters()  : array
getUser()  : string
isValid()  : bool
isValidParsed()  : bool
setApp()  : $this
setDateTime()  : $this
setIcon()  : $this
setLink()  : $this
setMessage()  : $this
setObject()  : $this
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()  : $this
setUser()  : $this

Methods

addAction()

public addAction(IAction $action) : $this
Parameters
$action : IAction
Tags
throws
InvalidArgumentException

if the action is invalid

since
9.0.0
Return values
$this

addParsedAction()

public addParsedAction(IAction $action) : $this
Parameters
$action : IAction
Tags
throws
InvalidArgumentException

if the action is invalid

since
9.0.0
Return values
$this

getActions()

public getActions() : \OCP\Notification\IAction[]
Tags
since
9.0.0
Return values
\OCP\Notification\IAction[]

getApp()

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

getDateTime()

public getDateTime() : DateTime
Tags
since
9.0.0
Return values
DateTime

getIcon()

public getIcon() : string
Tags
since
11.0.0
Return values
string
public getLink() : string
Tags
since
9.0.0
Return values
string

getMessage()

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

getMessageParameters()

public getMessageParameters() : array
Tags
since
9.0.0
Return values
array

getObjectId()

public getObjectId() : string
Tags
since
9.0.0
Return values
string

getObjectType()

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

getParsedActions()

public getParsedActions() : \OCP\Notification\IAction[]
Tags
since
9.0.0
Return values
\OCP\Notification\IAction[]

getParsedMessage()

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

getParsedSubject()

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

getRichMessage()

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

getRichMessageParameters()

public getRichMessageParameters() : array[]
Tags
since
11.0.0
Return values
array[]

getRichSubject()

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

getRichSubjectParameters()

public getRichSubjectParameters() : array[]
Tags
since
11.0.0
Return values
array[]

getSubject()

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

getSubjectParameters()

public getSubjectParameters() : array
Tags
since
9.0.0
Return values
array

getUser()

public getUser() : string
Tags
since
9.0.0
Return values
string

isValid()

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

isValidParsed()

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

setApp()

public setApp(string $app) : $this
Parameters
$app : string
Tags
throws
InvalidArgumentException

if the app id is invalid

since
9.0.0
Return values
$this

setDateTime()

public setDateTime(DateTime $dateTime) : $this
Parameters
$dateTime : DateTime
Tags
throws
InvalidArgumentException

if the $dateTime is invalid

since
9.0.0
Return values
$this

setIcon()

public setIcon(string $icon) : $this
Parameters
$icon : string
Tags
throws
InvalidArgumentException

if the icon is invalid

since
11.0.0
Return values
$this
public setLink(string $link) : $this
Parameters
$link : string
Tags
throws
InvalidArgumentException

if the link is invalid

since
9.0.0
Return values
$this

setMessage()

public setMessage(string $message[, array $parameters = [] ]) : $this
Parameters
$message : string
$parameters : array = []
Tags
throws
InvalidArgumentException

if the message or parameters are invalid

since
9.0.0
Return values
$this

setObject()

public setObject(string $type, string $id) : $this
Parameters
$type : string
$id : string
Tags
throws
InvalidArgumentException

if the object type or id is invalid

since
9.0.0
Return values
$this

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, but make sure, that a plain text message is always set via setParsedMessage, to support clients which can not handle rich strings.

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

Parameters
$message : string
Tags
throws
InvalidArgumentException

if the message is invalid

since
9.0.0
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, but make sure, that a plain text message is always set via setParsedSubject, to support clients which can not handle rich strings.

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

Parameters
$subject : string
Tags
throws
InvalidArgumentException

if the subject is invalid

since
9.0.0
Return values
$this

setRichMessage()

Set a RichObjectString message

public setRichMessage(string $message[, array $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. Also make sure, that a plain text message is always set via setParsedMessage, to support clients which can not handle rich strings.

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

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

if the message or parameters are invalid

since
11.0.0
Return values
$this

setRichSubject()

Set a RichObjectString subject

public setRichSubject(string $subject[, array $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. Also make sure, that a plain text subject is always set via setParsedSubject, to support clients which can not handle rich strings.

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

Parameters
$subject : string
$parameters : array = []
Tags
throws
InvalidArgumentException

if the subject or parameters are invalid

since
11.0.0
Return values
$this

setSubject()

public setSubject(string $subject[, array $parameters = [] ]) : $this
Parameters
$subject : string
$parameters : array = []
Tags
throws
InvalidArgumentException

if the subject or parameters are invalid

since
9.0.0
Return values
$this

setUser()

public setUser(string $user) : $this
Parameters
$user : string
Tags
throws
InvalidArgumentException

if the user id is invalid

since
9.0.0
Return values
$this

Search results