CommentsEntityEvent
extends Event
in package
Class CommentsEntityEvent
Tags
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
Properties
$collections
protected
array<string|int, Closure>
$collections
$propagationStopped
private
bool
$propagationStopped
= false
Tags
Methods
__construct()
DispatcherEvent constructor.
public
__construct() : mixed
Tags
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
getEntityCollections()
public
getEntityCollections() : array<string|int, Closure>
Tags
Return values
array<string|int, Closure>isPropagationStopped()
{@inheritDoc}
public
isPropagationStopped() : bool
Tags
Return values
boolstopPropagation()
Stops the propagation of the event to further event listeners
public
stopPropagation() : void