NodeOpenedEvent
extends AbstractNodeEvent
in package
A user opened a node in a client, as reported by that client.
Unlike BeforeNodeReadEvent, this is not dispatched when the content is read (sync, previews, downloads) but only when a client says the user actually opened it.
It is meant for statistics only, like recommending the files a user works with. Clients report it when they choose to, so it can be missing, repeated or sent for a node the user never looked at. Never use it for permissions, access control, auditing, or anything else that has to be reliable.
Tags
Attributes
- #[Listenable]
- $since: '36.0.0'
Table of Contents
Properties
Methods
- __construct() : mixed
- Compatibility constructor
- getNode() : Node
- getUser() : IUser
- The user who opened the node
- 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
Properties
$user
private
IUser
$user
Methods
__construct()
Compatibility constructor
public
__construct(Node $node, IUser $user) : mixed
Parameters
Tags
getNode()
public
getNode() : Node
Tags
Return values
NodegetUser()
The user who opened the node
public
getUser() : IUser
Tags
Return values
IUsergetWebhookSerializable()
Return data to be serialized and sent to the webhook. Will be serialized using json_encode.
public
getWebhookSerializable() : array<string|int, mixed>
Tags
Attributes
- #[Override]
Return values
array<string|int, mixed>isPropagationStopped()
{@inheritDoc}
public
isPropagationStopped() : bool
Tags
Attributes
- #[Override]
Return values
boolstopPropagation()
Stops the propagation of the event to further event listeners
public
stopPropagation() : void