\OCP\CommentsCommentsEntityEvent

Class CommentsEntityEvent

Summary

Methods
Properties
Constants
__construct()
addEntityCollection()
getEntityCollections()
No public properties found
EVENT_ENTITY
No protected methods found
$event
$collections
N/A
No private methods found
No private properties found
N/A

Constants

EVENT_ENTITY

EVENT_ENTITY

Properties

$event

$event : string

Type

string

$collections

$collections : array<mixed,\Closure>

Type

array<mixed,\Closure>

Methods

__construct()

__construct(string  $event) 

DispatcherEvent constructor.

Parameters

string $event

addEntityCollection()

addEntityCollection(string  $name, \Closure  $entityExistsFunction) 

Parameters

string $name
\Closure $entityExistsFunction

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.

Throws

\OutOfBoundsException

when the entity name is already taken

getEntityCollections()

getEntityCollections() : array<mixed,\Closure>

Returns

array<mixed,\Closure>