Files
nextcloud-forum/lib/Settings/AdminSettings.php

43 lines
998 B
PHP

<?php
namespace OCA\Forum\Settings;
use OCA\Forum\AppInfo\Application;
use OCP\AppFramework\Http\TemplateResponse;
use OCP\IAppConfig;
use OCP\IL10N;
use OCP\Settings\ISettings;
class AdminSettings implements ISettings {
public function __construct(
private IAppConfig $config,
private IL10N $l,
) {
}
/**
* @return TemplateResponse
*/
public function getForm(): TemplateResponse {
return new TemplateResponse(Application::APP_ID, 'settings', [
'script' => Application::getViteEntryScript('admin.ts'),
'style' => Application::getViteEntryScript('style.css'),
], '');
}
public function getSection(): string {
return Application::APP_ID;
}
/**
* @return int whether the form should be rather on the top or bottom of
* the admin section. The forms are arranged in ascending order of the
* priority values. It is required to return a value between 0 and 100.
*
* E.g.: 70
*/
public function getPriority(): int {
return 10;
}
}