aboutsummaryrefslogtreecommitdiffstats
path: root/apps/dav/lib/Settings/Admin/SystemAddressBookSettings.php
blob: 2f7b9f8fcc9d7a6ea220a781978b5a62001e3e84 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<?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' => [],
				],
			],
		];
	}

}