1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- <?php
- declare(strict_types=1);
- namespace OC\Metadata;
- use OCP\Capabilities\IPublicCapability;
- use OCP\IConfig;
- class Capabilities implements IPublicCapability {
- private IMetadataManager $manager;
- private IConfig $config;
- public function __construct(IMetadataManager $manager, IConfig $config) {
- $this->manager = $manager;
- $this->config = $config;
- }
- public function getCapabilities() {
- if ($this->config->getSystemValueBool('enable_file_metadata', true)) {
- return ['metadataAvailable' => $this->manager->getCapabilities()];
- }
- return [];
- }
- }
|