Nextcloud PHP API (master)

CommentsEntityEvent extends Event
in package

Class CommentsEntityEvent

Tags
since
9.1.0
since
28.0.0

Dispatched as a typed event

Table of Contents

Constants

EVENT_ENTITY  = 'OCP\Comments\ICommentsManager::registerEntity'

Properties

$collections  : array<string|int, Closure>
$propagationStopped  : bool

Methods

__construct()  : mixed
DispatcherEvent constructor.
addEntityCollection()  : mixed
getEntityCollections()  : array<string|int, Closure>
isPropagationStopped()  : bool
{@inheritDoc}
stopPropagation()  : void
Stops the propagation of the event to further event listeners

Constants

EVENT_ENTITY

  • Listen to the typed event instead.
public mixed EVENT_ENTITY = 'OCP\Comments\ICommentsManager::registerEntity'
Tags
since
9.1.0

Properties

$propagationStopped

private bool $propagationStopped = false
Tags
since
22.0.0

Methods

__construct()

DispatcherEvent constructor.

public __construct() : mixed
Tags
since
9.1.0

addEntityCollection()

public addEntityCollection(string $name, Closure $entityExistsFunction) : mixed
Parameters
$name : string
$entityExistsFunction : Closure

The closure should take one argument, which is the id of the entity, that comments should be handled for. The return should then be bool, depending on whether comments are allowed (true) or not.

Tags
throws
OutOfBoundsException

when the entity name is already taken

since
9.1.0

getEntityCollections()

public getEntityCollections() : array<string|int, Closure>
Tags
since
9.1.0
Return values
array<string|int, Closure>

isPropagationStopped()

{@inheritDoc}

public isPropagationStopped() : bool
Tags
since
22.0.0
see
StoppableEventInterface
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