diff options
Diffstat (limited to 'lib/public/Config/BeforePreferenceDeletedEvent.php')
-rw-r--r-- | lib/public/Config/BeforePreferenceDeletedEvent.php | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/lib/public/Config/BeforePreferenceDeletedEvent.php b/lib/public/Config/BeforePreferenceDeletedEvent.php new file mode 100644 index 00000000000..df89a2900bd --- /dev/null +++ b/lib/public/Config/BeforePreferenceDeletedEvent.php @@ -0,0 +1,65 @@ +<?php + +declare(strict_types=1); +/** + * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors + * SPDX-License-Identifier: AGPL-3.0-or-later + */ + +namespace OCP\Config; + +use OCP\AppFramework\Attribute\Listenable; +use OCP\EventDispatcher\Event; + +#[Listenable(since: '25.0.0')] +class BeforePreferenceDeletedEvent extends Event { + protected string $userId; + protected string $appId; + protected string $configKey; + protected bool $valid = false; + + /** + * @since 25.0.0 + */ + public function __construct(string $userId, string $appId, string $configKey) { + parent::__construct(); + $this->userId = $userId; + $this->appId = $appId; + $this->configKey = $configKey; + } + + /** + * @since 25.0.0 + */ + public function getUserId(): string { + return $this->userId; + } + + /** + * @since 25.0.0 + */ + public function getAppId(): string { + return $this->appId; + } + + /** + * @since 25.0.0 + */ + public function getConfigKey(): string { + return $this->configKey; + } + + /** + * @since 25.0.0 + */ + public function isValid(): bool { + return $this->valid; + } + + /** + * @since 25.0.0 + */ + public function setValid(bool $valid): void { + $this->valid = $valid; + } +} |