blob: ce7239a4bf56c5919023c1aee27b16b2b5ed32cf (
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
|
<?php
/**
* SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors
* SPDX-FileCopyrightText: 2016 ownCloud, Inc.
* SPDX-License-Identifier: AGPL-3.0-only
*/
namespace OCA\Files_Versions;
use OCP\App\IAppManager;
use OCP\Capabilities\ICapability;
use OCP\IConfig;
class Capabilities implements ICapability {
private IConfig $config;
private IAppManager $appManager;
public function __construct(
IConfig $config,
IAppManager $appManager
) {
$this->config = $config;
$this->appManager = $appManager;
}
/**
* Return this classes capabilities
*
* @return array{files: array{versioning: bool, version_labeling: bool, version_deletion: bool}}
*/
public function getCapabilities() {
return [
'files' => [
'versioning' => true,
'version_labeling' => $this->config->getSystemValueBool('enable_version_labeling', true),
'version_deletion' => $this->config->getSystemValueBool('enable_version_deletion', true),
]
];
}
}
|