diff options
Diffstat (limited to 'lib/public/Settings/IDeclarativeSettingsFormWithHandlers.php')
-rw-r--r-- | lib/public/Settings/IDeclarativeSettingsFormWithHandlers.php | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/lib/public/Settings/IDeclarativeSettingsFormWithHandlers.php b/lib/public/Settings/IDeclarativeSettingsFormWithHandlers.php new file mode 100644 index 00000000000..180df73d995 --- /dev/null +++ b/lib/public/Settings/IDeclarativeSettingsFormWithHandlers.php @@ -0,0 +1,31 @@ +<?php + +declare(strict_types=1); + +/** + * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors + * SPDX-License-Identifier: AGPL-3.0-or-later + */ + +namespace OCP\Settings; + +use OCP\IUser; + +/** + * @since 31.0.0 + */ +interface IDeclarativeSettingsFormWithHandlers extends IDeclarativeSettingsForm { + + /** + * This function is called to get the current value of a specific forms field. + * @since 31.0.0 + */ + public function getValue(string $fieldId, IUser $user): mixed; + + /** + * This function is called when a user updated a form field to persist the setting. + * @since 31.0.0 + */ + public function setValue(string $fieldId, mixed $value, IUser $user): void; + +} |