Nextcloud PHP API (master)

CommentsEvent extends Event
in package
implements IWebhookCompatibleEvent

Class CommentsEvent

Tags
since
9.0.0

In the future, once the deprecated methods are removed, this class will be abstract.

Attributes
#[Consumable]
$since: '9.0.0'

Table of Contents

Interfaces

IWebhookCompatibleEvent
Interface for events which can be listened to by webhooks

Constants

EVENT_ADD  : mixed = 'OCP\Comments\ICommentsManager::addComment'
EVENT_DELETE  : mixed = 'OCP\Comments\ICommentsManager::deleteComment'
EVENT_PRE_UPDATE  : mixed = 'OCP\Comments\ICommentsManager::preUpdateComment'
EVENT_UPDATE  : mixed = 'OCP\Comments\ICommentsManager::updateComment'

Properties

$comment  : IComment
$event  : string

Methods

__construct()  : mixed
CommentsEvent constructor.
getComment()  : IComment
getEvent()  : string
getWebhookSerializable()  : array<string|int, mixed>
Return data to be serialized and sent to the webhook. Will be serialized using json_encode.
isPropagationStopped()  : bool
{@inheritDoc}
stopPropagation()  : void
Stops the propagation of the event to further event listeners

Constants

EVENT_ADD

Use \OCP\Comments\Events\CommentAddedEvent instead.

public mixed EVENT_ADD = 'OCP\Comments\ICommentsManager::addComment'
Tags
since
11.0.0

EVENT_DELETE

Use \OCP\Comments\Events\CommentDeletedEvent instead.

public mixed EVENT_DELETE = 'OCP\Comments\ICommentsManager::deleteComment'
Tags
since
11.0.0

EVENT_PRE_UPDATE

Use \OCP\Comments\Events\BeforeCommentUpdatedEvent instead.

public mixed EVENT_PRE_UPDATE = 'OCP\Comments\ICommentsManager::preUpdateComment'
Tags
since
11.0.0

EVENT_UPDATE

Use \OCP\Comments\Events\CommentUpdatedEvent instead.

public mixed EVENT_UPDATE = 'OCP\Comments\ICommentsManager::updateComment'
Tags
since
11.0.0

Properties

Methods

__construct()

CommentsEvent constructor.

public __construct(string $event, IComment $comment) : mixed
Parameters
$event : string
$comment : IComment
Tags
since
9.0.0

getEvent()

public getEvent() : string

Use instanceof CommentAddedEvent, CommentRemovedEvent, CommentUpdatedEvent or BeforeCommentUpdatedEvent instead.

Tags
since
9.0.0
Return values
string

getWebhookSerializable()

Return data to be serialized and sent to the webhook. Will be serialized using json_encode.

public getWebhookSerializable() : array<string|int, mixed>
Tags
since
35.0.2
Attributes
#[Override]
Return values
array<string|int, mixed>

isPropagationStopped()

{@inheritDoc}

public isPropagationStopped() : bool
Tags
since
22.0.0
see
StoppableEventInterface
Attributes
#[Override]
Return values
bool

stopPropagation()

Stops the propagation of the event to further event listeners

public stopPropagation() : void
Tags
since
22.0.0
On this page

Search results