CommentsEntityEvent extends Event
Class CommentsEntityEvent
Typically this class isn't instantiated directly but sub classed for specific event types
Tags
Table of Contents
- EVENT_ENTITY = 'OCP\Comments\ICommentsManager::registerEntity'
- $collections : \Closure[]
- $event : string
- __construct() : mixed
- DispatcherEvent constructor.
- addEntityCollection() : mixed
- getEntityCollections() : \Closure[]
Constants
EVENT_ENTITY
public
mixed
EVENT_ENTITY
= 'OCP\Comments\ICommentsManager::registerEntity'
Properties
$collections
protected
\Closure[]
$collections
$event
protected
string
$event
Methods
__construct()
DispatcherEvent constructor.
public
__construct(string $event) : mixed
In Nextcloud 17.0.0 this event class used a now deprecated/removed Symfony base class that had a constructor (with default arguments). To lower the risk of a breaking change (PHP won't allow parent constructor calls if there is none), this empty constructor's only purpose is to hopefully not break existing sub- classes of this class.
Parameters
- $event : string
Tags
Return values
mixed —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
Return values
mixed —getEntityCollections()
public
getEntityCollections() : \Closure[]