0
0
Fork 0
mirror of https://github.com/nextcloud/server.git synced 2025-05-07 07:11:32 +00:00
nextcloud_server/apps/dav/lib/Settings/Admin/SystemAddressBookSettings.php
SebastianKrupinski 9b0302f7ac feat: add system address book settings in ui
Signed-off-by: SebastianKrupinski <krupinskis05@gmail.com>
2025-03-07 09:31:30 -05:00

43 lines
1.1 KiB
PHP

<?php
declare(strict_types=1);
/**
* SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
namespace OCA\DAV\Settings\Admin;
use OCP\IL10N;
use OCP\Settings\DeclarativeSettingsTypes;
use OCP\Settings\IDeclarativeSettingsForm;
class SystemAddressBookSettings implements IDeclarativeSettingsForm {
public function __construct(
private IL10N $l,
) {
}
public function getSchema(): array {
return [
'id' => 'dav-admin-system-address-book',
'priority' => 10,
'section_type' => DeclarativeSettingsTypes::SECTION_TYPE_ADMIN,
'section_id' => 'groupware',
'storage_type' => DeclarativeSettingsTypes::STORAGE_TYPE_EXTERNAL,
'title' => $this->l->t('System Address Book'),
'description' => $this->l->t('The system address book contains contact information for all users in your instance.'),
'fields' => [
[
'id' => 'system_addressbook_enabled',
'title' => $this->l->t('Enable System Address Book'),
'type' => DeclarativeSettingsTypes::CHECKBOX,
'default' => false,
'options' => [],
],
],
];
}
}