Nextcloud PHP API (master)

BeforePreferenceDeletedEvent extends Event
in package

Dispatched before a user preference is deleted via the preferences API; the deletion is rejected unless a listener marks it valid.

Tags
since
25.0.0
Attributes
#[Listenable]
$since: '25.0.0'

Table of Contents

Properties

$appId  : string
$configKey  : string
$userId  : string
$valid  : bool|null

Methods

__construct()  : mixed
Compatibility constructor
getAppId()  : string
getConfigKey()  : string
getUserId()  : string
isPropagationStopped()  : bool
{@inheritDoc}
isRejected()  : bool
Whether a listener explicitly refused the change via setValid(false)
isValid()  : bool
setValid()  : void
stopPropagation()  : void
Stops the propagation of the event to further event listeners

Properties

Methods

__construct()

Compatibility constructor

public __construct(string $userId, string $appId, string $configKey) : mixed
Parameters
$userId : string
$appId : string
$configKey : string
Tags
since
25.0.0

isPropagationStopped()

{@inheritDoc}

public isPropagationStopped() : bool
Tags
since
22.0.0
see
StoppableEventInterface
Attributes
#[Override]
Return values
bool

isRejected()

Whether a listener explicitly refused the change via setValid(false)

public isRejected() : bool

Admin contexts (e.g. occ) only block the change when it was rejected, while user contexts require it to be valid.

Tags
since
36.0.0
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