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
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
$appId
protected
string
$appId
$configKey
protected
string
$configKey
$userId
protected
string
$userId
$valid
protected
bool|null
$valid
= null
Methods
__construct()
Compatibility constructor
public
__construct(string $userId, string $appId, string $configKey) : mixed
Parameters
- $userId : string
- $appId : string
- $configKey : string
Tags
getAppId()
public
getAppId() : string
Tags
Return values
stringgetConfigKey()
public
getConfigKey() : string
Tags
Return values
stringgetUserId()
public
getUserId() : string
Tags
Return values
stringisPropagationStopped()
{@inheritDoc}
public
isPropagationStopped() : bool
Tags
Attributes
- #[Override]
Return values
boolisRejected()
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
Return values
boolisValid()
public
isValid() : bool
Tags
Return values
boolsetValid()
public
setValid(bool $valid) : void
Parameters
- $valid : bool
Tags
stopPropagation()
Stops the propagation of the event to further event listeners
public
stopPropagation() : void