summaryrefslogtreecommitdiffstats
path: root/apps/accessibility
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2021-03-02 19:52:39 +0100
committerRoeland Jago Douma <roeland@famdouma.nl>2021-03-02 21:11:56 +0100
commitbc961baa40ef93b53562bd6d1de74de70fba9e8d (patch)
tree6725196d966ab0aa1f0946cf474089fbb37ad6a8 /apps/accessibility
parent3b5c8d792dc0986a749e0b23022d48d20a5f2d6c (diff)
downloadnextcloud-server-bc961baa40ef93b53562bd6d1de74de70fba9e8d.tar.gz
nextcloud-server-bc961baa40ef93b53562bd6d1de74de70fba9e8d.zip
Move some settings over to the IInitialState
The old one has been deprecated. Part one of many. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'apps/accessibility')
-rw-r--r--apps/accessibility/lib/Settings/Personal.php26
1 files changed, 8 insertions, 18 deletions
diff --git a/apps/accessibility/lib/Settings/Personal.php b/apps/accessibility/lib/Settings/Personal.php
index 30df78f9766..64cfe451494 100644
--- a/apps/accessibility/lib/Settings/Personal.php
+++ b/apps/accessibility/lib/Settings/Personal.php
@@ -27,8 +27,8 @@ namespace OCA\Accessibility\Settings;
use OCA\Accessibility\AccessibilityProvider;
use OCP\AppFramework\Http\TemplateResponse;
+use OCP\AppFramework\Services\IInitialState;
use OCP\IConfig;
-use OCP\IInitialStateService;
use OCP\IL10N;
use OCP\IURLGenerator;
use OCP\IUserSession;
@@ -55,26 +55,16 @@ class Personal implements ISettings {
/** @var AccessibilityProvider */
private $accessibilityProvider;
- /** @var IInitialStateService */
+ /** @var IInitialState */
private $initialStateService;
- /**
- * Settings constructor.
- *
- * @param string $appName
- * @param IConfig $config
- * @param IUserSession $userSession
- * @param IL10N $l
- * @param IURLGenerator $urlGenerator
- * @param AccessibilityProvider $accessibilityProvider
- */
public function __construct(string $appName,
IConfig $config,
IUserSession $userSession,
IL10N $l,
IURLGenerator $urlGenerator,
AccessibilityProvider $accessibilityProvider,
- IInitialStateService $initialStateService) {
+ IInitialState $initialStateService) {
$this->appName = $appName;
$this->config = $config;
$this->userSession = $userSession;
@@ -88,7 +78,7 @@ class Personal implements ISettings {
* @return TemplateResponse returns the instance with all parameters set, ready to be rendered
* @since 9.1
*/
- public function getForm() {
+ public function getForm(): TemplateResponse {
Util::addScript('accessibility', 'accessibility');
Util::addStyle('accessibility', 'style');
@@ -104,8 +94,8 @@ class Personal implements ISettings {
'font' => $this->config->getUserValue($this->userSession->getUser()->getUID(), $this->appName, 'font', false)
];
- $this->initialStateService->provideInitialState($this->appName, 'available-config', $availableConfig);
- $this->initialStateService->provideInitialState($this->appName, 'user-config', $userConfig);
+ $this->initialStateService->provideInitialState('available-config', $availableConfig);
+ $this->initialStateService->provideInitialState('user-config', $userConfig);
return new TemplateResponse($this->appName, 'settings-personal');
}
@@ -114,7 +104,7 @@ class Personal implements ISettings {
* @return string the section ID, e.g. 'sharing'
* @since 9.1
*/
- public function getSection() {
+ public function getSection(): string {
return $this->appName;
}
@@ -126,7 +116,7 @@ class Personal implements ISettings {
* E.g.: 70
* @since 9.1
*/
- public function getPriority() {
+ public function getPriority(): int {
return 40;
}
}