INotification

interface OCP\Notification\INotification
Interface INotification
Implemented by:OC\Notification\Notification
Source:lib/public/Notification/INotification.php#34

Methods

public OCP\Notification\INotification::setApp($app)
Source:

lib/public/Notification/INotification.php#41

Parameters:
  • $app (string)
Returns:

$this

Throws:

\InvalidArgumentException if the app id is invalid

Since:

9.0.0

public OCP\Notification\INotification::getApp()
Source:lib/public/Notification/INotification.php#47
Returns:string
Since:9.0.0
public OCP\Notification\INotification::setUser($user)
Source:

lib/public/Notification/INotification.php#55

Parameters:
  • $user (string)
Returns:

$this

Throws:

\InvalidArgumentException if the user id is invalid

Since:

9.0.0

public OCP\Notification\INotification::getUser()
Source:lib/public/Notification/INotification.php#61
Returns:string
Since:9.0.0
public OCP\Notification\INotification::setDateTime($dateTime)
Source:

lib/public/Notification/INotification.php#69

Parameters:
  • $dateTime (DateTime)
Returns:

$this

Throws:

\InvalidArgumentException if the $dateTime is invalid

Since:

9.0.0

public OCP\Notification\INotification::getDateTime()
Source:lib/public/Notification/INotification.php#75
Returns:\DateTime
Since:9.0.0
public OCP\Notification\INotification::setObject($type, $id)
Source:

lib/public/Notification/INotification.php#84

Parameters:
  • $type (string)
  • $id (string)
Returns:

$this

Throws:

\InvalidArgumentException if the object type or id is invalid

Since:

9.0.0

public OCP\Notification\INotification::getObjectType()
Source:lib/public/Notification/INotification.php#90
Returns:string
Since:9.0.0
public OCP\Notification\INotification::getObjectId()
Source:lib/public/Notification/INotification.php#96
Returns:string
Since:9.0.0
public OCP\Notification\INotification::setSubject($subject, $parameters=[])
Source:

lib/public/Notification/INotification.php#105

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

$this

Throws:

\InvalidArgumentException if the subject or parameters are invalid

Since:

9.0.0

public OCP\Notification\INotification::getSubject()
Source:lib/public/Notification/INotification.php#111
Returns:string
Since:9.0.0
public OCP\Notification\INotification::getSubjectParameters()
Source:lib/public/Notification/INotification.php#117
Returns:array
Since:9.0.0
public OCP\Notification\INotification::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/Notification/INotification.php#136

Parameters:
  • $subject (string)
Returns:

$this

Throws:

\InvalidArgumentException if the subject is invalid

Since:

9.0.0

public OCP\Notification\INotification::getParsedSubject()
Source:lib/public/Notification/INotification.php#142
Returns:string
Since:9.0.0
public OCP\Notification\INotification::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/Notification/INotification.php#161

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

$this

Throws:

\InvalidArgumentException if the subject or parameters are invalid

Since:

11.0.0

public OCP\Notification\INotification::getRichSubject()
Source:lib/public/Notification/INotification.php#167
Returns:string
Since:11.0.0
public OCP\Notification\INotification::getRichSubjectParameters()
Source:lib/public/Notification/INotification.php#173
Returns:array[]
Since:11.0.0
public OCP\Notification\INotification::setMessage($message, $parameters=[])
Source:

lib/public/Notification/INotification.php#182

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

$this

Throws:

\InvalidArgumentException if the message or parameters are invalid

Since:

9.0.0

public OCP\Notification\INotification::getMessage()
Source:lib/public/Notification/INotification.php#188
Returns:string
Since:9.0.0
public OCP\Notification\INotification::getMessageParameters()
Source:lib/public/Notification/INotification.php#194
Returns:array
Since:9.0.0
public OCP\Notification\INotification::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/Notification/INotification.php#213

Parameters:
  • $message (string)
Returns:

$this

Throws:

\InvalidArgumentException if the message is invalid

Since:

9.0.0

public OCP\Notification\INotification::getParsedMessage()
Source:lib/public/Notification/INotification.php#219
Returns:string
Since:9.0.0
public OCP\Notification\INotification::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/Notification/INotification.php#238

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

$this

Throws:

\InvalidArgumentException if the message or parameters are invalid

Since:

11.0.0

public OCP\Notification\INotification::getRichMessage()
Source:lib/public/Notification/INotification.php#244
Returns:string
Since:11.0.0
public OCP\Notification\INotification::getRichMessageParameters()
Source:lib/public/Notification/INotification.php#250
Returns:array[]
Since:11.0.0
Source:

lib/public/Notification/INotification.php#258

Parameters:
  • $link (string)
Returns:

$this

Throws:

\InvalidArgumentException if the link is invalid

Since:

9.0.0

Source:lib/public/Notification/INotification.php#264
Returns:string
Since:9.0.0
public OCP\Notification\INotification::setIcon($icon)
Source:

lib/public/Notification/INotification.php#272

Parameters:
  • $icon (string)
Returns:

$this

Throws:

\InvalidArgumentException if the icon is invalid

Since:

11.0.0

public OCP\Notification\INotification::getIcon()
Source:lib/public/Notification/INotification.php#278
Returns:string
Since:11.0.0
public OCP\Notification\INotification::createAction()
Source:lib/public/Notification/INotification.php#284
Returns:\OCP\Notification\IAction
Since:9.0.0
public OCP\Notification\INotification::addAction($action)
Source:

lib/public/Notification/INotification.php#292

Parameters:
Returns:

$this

Throws:

\InvalidArgumentException if the action is invalid

Since:

9.0.0

public OCP\Notification\INotification::getActions()
Source:lib/public/Notification/INotification.php#298
Returns:\OCP\Notification\IAction[]
Since:9.0.0
public OCP\Notification\INotification::addParsedAction($action)
Source:

lib/public/Notification/INotification.php#306

Parameters:
Returns:

$this

Throws:

\InvalidArgumentException if the action is invalid

Since:

9.0.0

public OCP\Notification\INotification::getParsedActions()
Source:lib/public/Notification/INotification.php#312
Returns:\OCP\Notification\IAction[]
Since:9.0.0
public OCP\Notification\INotification::isValid()
Source:lib/public/Notification/INotification.php#318
Returns:bool
Since:9.0.0
public OCP\Notification\INotification::isValidParsed()
Source:lib/public/Notification/INotification.php#324
Returns:bool
Since:9.0.0