@@ -30,30 +30,30 @@ |
||
30 | 30 | |
31 | 31 | class Additional implements IIconSection { |
32 | 32 | |
33 | - /** @var IL10N */ |
|
34 | - private $l; |
|
33 | + /** @var IL10N */ |
|
34 | + private $l; |
|
35 | 35 | |
36 | - /** @var IURLGenerator */ |
|
37 | - private $urlGenerator; |
|
36 | + /** @var IURLGenerator */ |
|
37 | + private $urlGenerator; |
|
38 | 38 | |
39 | - public function __construct(IL10N $l, IURLGenerator $urlGenerator) { |
|
40 | - $this->l = $l; |
|
41 | - $this->urlGenerator = $urlGenerator; |
|
42 | - } |
|
39 | + public function __construct(IL10N $l, IURLGenerator $urlGenerator) { |
|
40 | + $this->l = $l; |
|
41 | + $this->urlGenerator = $urlGenerator; |
|
42 | + } |
|
43 | 43 | |
44 | - public function getIcon(): string { |
|
45 | - return $this->urlGenerator->imagePath('core', 'actions/settings-dark.svg'); |
|
46 | - } |
|
44 | + public function getIcon(): string { |
|
45 | + return $this->urlGenerator->imagePath('core', 'actions/settings-dark.svg'); |
|
46 | + } |
|
47 | 47 | |
48 | - public function getID(): string { |
|
49 | - return 'additional'; |
|
50 | - } |
|
48 | + public function getID(): string { |
|
49 | + return 'additional'; |
|
50 | + } |
|
51 | 51 | |
52 | - public function getName(): string { |
|
53 | - return $this->l->t('Additional settings'); |
|
54 | - } |
|
52 | + public function getName(): string { |
|
53 | + return $this->l->t('Additional settings'); |
|
54 | + } |
|
55 | 55 | |
56 | - public function getPriority(): int { |
|
57 | - return 98; |
|
58 | - } |
|
56 | + public function getPriority(): int { |
|
57 | + return 98; |
|
58 | + } |
|
59 | 59 | } |
@@ -30,30 +30,30 @@ |
||
30 | 30 | |
31 | 31 | class Sharing implements IIconSection { |
32 | 32 | |
33 | - /** @var IL10N */ |
|
34 | - private $l; |
|
33 | + /** @var IL10N */ |
|
34 | + private $l; |
|
35 | 35 | |
36 | - /** @var IURLGenerator */ |
|
37 | - private $urlGenerator; |
|
36 | + /** @var IURLGenerator */ |
|
37 | + private $urlGenerator; |
|
38 | 38 | |
39 | - public function __construct(IL10N $l, IURLGenerator $urlGenerator) { |
|
40 | - $this->l = $l; |
|
41 | - $this->urlGenerator = $urlGenerator; |
|
42 | - } |
|
39 | + public function __construct(IL10N $l, IURLGenerator $urlGenerator) { |
|
40 | + $this->l = $l; |
|
41 | + $this->urlGenerator = $urlGenerator; |
|
42 | + } |
|
43 | 43 | |
44 | - public function getIcon(): string { |
|
45 | - return $this->urlGenerator->imagePath('core', 'actions/share.svg'); |
|
46 | - } |
|
44 | + public function getIcon(): string { |
|
45 | + return $this->urlGenerator->imagePath('core', 'actions/share.svg'); |
|
46 | + } |
|
47 | 47 | |
48 | - public function getID(): string { |
|
49 | - return 'sharing'; |
|
50 | - } |
|
48 | + public function getID(): string { |
|
49 | + return 'sharing'; |
|
50 | + } |
|
51 | 51 | |
52 | - public function getName(): string { |
|
53 | - return $this->l->t('Sharing'); |
|
54 | - } |
|
52 | + public function getName(): string { |
|
53 | + return $this->l->t('Sharing'); |
|
54 | + } |
|
55 | 55 | |
56 | - public function getPriority(): int { |
|
57 | - return 5; |
|
58 | - } |
|
56 | + public function getPriority(): int { |
|
57 | + return 5; |
|
58 | + } |
|
59 | 59 | } |
@@ -30,30 +30,30 @@ |
||
30 | 30 | |
31 | 31 | class Security implements IIconSection { |
32 | 32 | |
33 | - /** @var IL10N */ |
|
34 | - private $l; |
|
33 | + /** @var IL10N */ |
|
34 | + private $l; |
|
35 | 35 | |
36 | - /** @var IURLGenerator */ |
|
37 | - private $urlGenerator; |
|
36 | + /** @var IURLGenerator */ |
|
37 | + private $urlGenerator; |
|
38 | 38 | |
39 | - public function __construct(IL10N $l, IURLGenerator $urlGenerator) { |
|
40 | - $this->l = $l; |
|
41 | - $this->urlGenerator = $urlGenerator; |
|
42 | - } |
|
39 | + public function __construct(IL10N $l, IURLGenerator $urlGenerator) { |
|
40 | + $this->l = $l; |
|
41 | + $this->urlGenerator = $urlGenerator; |
|
42 | + } |
|
43 | 43 | |
44 | - public function getIcon(): string { |
|
45 | - return $this->urlGenerator->imagePath('core', 'actions/password.svg'); |
|
46 | - } |
|
44 | + public function getIcon(): string { |
|
45 | + return $this->urlGenerator->imagePath('core', 'actions/password.svg'); |
|
46 | + } |
|
47 | 47 | |
48 | - public function getID(): string { |
|
49 | - return 'security'; |
|
50 | - } |
|
48 | + public function getID(): string { |
|
49 | + return 'security'; |
|
50 | + } |
|
51 | 51 | |
52 | - public function getName(): string { |
|
53 | - return $this->l->t('Security'); |
|
54 | - } |
|
52 | + public function getName(): string { |
|
53 | + return $this->l->t('Security'); |
|
54 | + } |
|
55 | 55 | |
56 | - public function getPriority(): int { |
|
57 | - return 10; |
|
58 | - } |
|
56 | + public function getPriority(): int { |
|
57 | + return 10; |
|
58 | + } |
|
59 | 59 | } |
@@ -30,30 +30,30 @@ |
||
30 | 30 | |
31 | 31 | class Server implements IIconSection { |
32 | 32 | |
33 | - /** @var IL10N */ |
|
34 | - private $l; |
|
33 | + /** @var IL10N */ |
|
34 | + private $l; |
|
35 | 35 | |
36 | - /** @var IURLGenerator */ |
|
37 | - private $urlGenerator; |
|
36 | + /** @var IURLGenerator */ |
|
37 | + private $urlGenerator; |
|
38 | 38 | |
39 | - public function __construct(IL10N $l, IURLGenerator $urlGenerator) { |
|
40 | - $this->l = $l; |
|
41 | - $this->urlGenerator = $urlGenerator; |
|
42 | - } |
|
39 | + public function __construct(IL10N $l, IURLGenerator $urlGenerator) { |
|
40 | + $this->l = $l; |
|
41 | + $this->urlGenerator = $urlGenerator; |
|
42 | + } |
|
43 | 43 | |
44 | - public function getIcon(): string { |
|
45 | - return $this->urlGenerator->imagePath('core', 'actions/settings-dark.svg'); |
|
46 | - } |
|
44 | + public function getIcon(): string { |
|
45 | + return $this->urlGenerator->imagePath('core', 'actions/settings-dark.svg'); |
|
46 | + } |
|
47 | 47 | |
48 | - public function getID(): string { |
|
49 | - return 'server'; |
|
50 | - } |
|
48 | + public function getID(): string { |
|
49 | + return 'server'; |
|
50 | + } |
|
51 | 51 | |
52 | - public function getName(): string { |
|
53 | - return $this->l->t('Basic settings'); |
|
54 | - } |
|
52 | + public function getName(): string { |
|
53 | + return $this->l->t('Basic settings'); |
|
54 | + } |
|
55 | 55 | |
56 | - public function getPriority(): int { |
|
57 | - return 1; |
|
58 | - } |
|
56 | + public function getPriority(): int { |
|
57 | + return 1; |
|
58 | + } |
|
59 | 59 | } |
@@ -30,30 +30,30 @@ |
||
30 | 30 | |
31 | 31 | class Overview implements IIconSection { |
32 | 32 | |
33 | - /** @var IL10N */ |
|
34 | - private $l; |
|
33 | + /** @var IL10N */ |
|
34 | + private $l; |
|
35 | 35 | |
36 | - /** @var IURLGenerator */ |
|
37 | - private $urlGenerator; |
|
36 | + /** @var IURLGenerator */ |
|
37 | + private $urlGenerator; |
|
38 | 38 | |
39 | - public function __construct(IL10N $l, IURLGenerator $urlGenerator) { |
|
40 | - $this->l = $l; |
|
41 | - $this->urlGenerator = $urlGenerator; |
|
42 | - } |
|
39 | + public function __construct(IL10N $l, IURLGenerator $urlGenerator) { |
|
40 | + $this->l = $l; |
|
41 | + $this->urlGenerator = $urlGenerator; |
|
42 | + } |
|
43 | 43 | |
44 | - public function getIcon(): string { |
|
45 | - return $this->urlGenerator->imagePath('settings', 'admin.svg'); |
|
46 | - } |
|
44 | + public function getIcon(): string { |
|
45 | + return $this->urlGenerator->imagePath('settings', 'admin.svg'); |
|
46 | + } |
|
47 | 47 | |
48 | - public function getID(): string { |
|
49 | - return 'overview'; |
|
50 | - } |
|
48 | + public function getID(): string { |
|
49 | + return 'overview'; |
|
50 | + } |
|
51 | 51 | |
52 | - public function getName(): string { |
|
53 | - return $this->l->t('Overview'); |
|
54 | - } |
|
52 | + public function getName(): string { |
|
53 | + return $this->l->t('Overview'); |
|
54 | + } |
|
55 | 55 | |
56 | - public function getPriority(): int { |
|
57 | - return 0; |
|
58 | - } |
|
56 | + public function getPriority(): int { |
|
57 | + return 0; |
|
58 | + } |
|
59 | 59 | } |
@@ -30,30 +30,30 @@ |
||
30 | 30 | |
31 | 31 | class SyncClients implements IIconSection { |
32 | 32 | |
33 | - /** @var IL10N */ |
|
34 | - private $l; |
|
33 | + /** @var IL10N */ |
|
34 | + private $l; |
|
35 | 35 | |
36 | - /** @var IURLGenerator */ |
|
37 | - private $urlGenerator; |
|
36 | + /** @var IURLGenerator */ |
|
37 | + private $urlGenerator; |
|
38 | 38 | |
39 | - public function __construct(IL10N $l, IURLGenerator $urlGenerator) { |
|
40 | - $this->l = $l; |
|
41 | - $this->urlGenerator = $urlGenerator; |
|
42 | - } |
|
39 | + public function __construct(IL10N $l, IURLGenerator $urlGenerator) { |
|
40 | + $this->l = $l; |
|
41 | + $this->urlGenerator = $urlGenerator; |
|
42 | + } |
|
43 | 43 | |
44 | - public function getIcon() { |
|
45 | - return $this->urlGenerator->imagePath('core', 'clients/phone.svg'); |
|
46 | - } |
|
44 | + public function getIcon() { |
|
45 | + return $this->urlGenerator->imagePath('core', 'clients/phone.svg'); |
|
46 | + } |
|
47 | 47 | |
48 | - public function getID(): string { |
|
49 | - return 'sync-clients'; |
|
50 | - } |
|
48 | + public function getID(): string { |
|
49 | + return 'sync-clients'; |
|
50 | + } |
|
51 | 51 | |
52 | - public function getName(): string { |
|
53 | - return $this->l->t('Mobile & desktop'); |
|
54 | - } |
|
52 | + public function getName(): string { |
|
53 | + return $this->l->t('Mobile & desktop'); |
|
54 | + } |
|
55 | 55 | |
56 | - public function getPriority(): int { |
|
57 | - return 15; |
|
58 | - } |
|
56 | + public function getPriority(): int { |
|
57 | + return 15; |
|
58 | + } |
|
59 | 59 | } |
@@ -30,30 +30,30 @@ |
||
30 | 30 | |
31 | 31 | class Security implements IIconSection { |
32 | 32 | |
33 | - /** @var IL10N */ |
|
34 | - private $l; |
|
33 | + /** @var IL10N */ |
|
34 | + private $l; |
|
35 | 35 | |
36 | - /** @var IURLGenerator */ |
|
37 | - private $urlGenerator; |
|
36 | + /** @var IURLGenerator */ |
|
37 | + private $urlGenerator; |
|
38 | 38 | |
39 | - public function __construct(IL10N $l, IURLGenerator $urlGenerator) { |
|
40 | - $this->l = $l; |
|
41 | - $this->urlGenerator = $urlGenerator; |
|
42 | - } |
|
39 | + public function __construct(IL10N $l, IURLGenerator $urlGenerator) { |
|
40 | + $this->l = $l; |
|
41 | + $this->urlGenerator = $urlGenerator; |
|
42 | + } |
|
43 | 43 | |
44 | - public function getIcon() { |
|
45 | - return $this->urlGenerator->imagePath('settings', 'password.svg'); |
|
46 | - } |
|
44 | + public function getIcon() { |
|
45 | + return $this->urlGenerator->imagePath('settings', 'password.svg'); |
|
46 | + } |
|
47 | 47 | |
48 | - public function getID(): string { |
|
49 | - return 'security'; |
|
50 | - } |
|
48 | + public function getID(): string { |
|
49 | + return 'security'; |
|
50 | + } |
|
51 | 51 | |
52 | - public function getName(): string { |
|
53 | - return $this->l->t('Security'); |
|
54 | - } |
|
52 | + public function getName(): string { |
|
53 | + return $this->l->t('Security'); |
|
54 | + } |
|
55 | 55 | |
56 | - public function getPriority(): int { |
|
57 | - return 5; |
|
58 | - } |
|
56 | + public function getPriority(): int { |
|
57 | + return 5; |
|
58 | + } |
|
59 | 59 | } |
@@ -30,30 +30,30 @@ |
||
30 | 30 | |
31 | 31 | class PersonalInfo implements IIconSection { |
32 | 32 | |
33 | - /** @var IL10N */ |
|
34 | - private $l; |
|
33 | + /** @var IL10N */ |
|
34 | + private $l; |
|
35 | 35 | |
36 | - /** @var IURLGenerator */ |
|
37 | - private $urlGenerator; |
|
36 | + /** @var IURLGenerator */ |
|
37 | + private $urlGenerator; |
|
38 | 38 | |
39 | - public function __construct(IL10N $l, IURLGenerator $urlGenerator) { |
|
40 | - $this->l = $l; |
|
41 | - $this->urlGenerator = $urlGenerator; |
|
42 | - } |
|
39 | + public function __construct(IL10N $l, IURLGenerator $urlGenerator) { |
|
40 | + $this->l = $l; |
|
41 | + $this->urlGenerator = $urlGenerator; |
|
42 | + } |
|
43 | 43 | |
44 | - public function getIcon() { |
|
45 | - return $this->urlGenerator->imagePath('core', 'actions/user.svg'); |
|
46 | - } |
|
44 | + public function getIcon() { |
|
45 | + return $this->urlGenerator->imagePath('core', 'actions/user.svg'); |
|
46 | + } |
|
47 | 47 | |
48 | - public function getID(): string { |
|
49 | - return 'personal-info'; |
|
50 | - } |
|
48 | + public function getID(): string { |
|
49 | + return 'personal-info'; |
|
50 | + } |
|
51 | 51 | |
52 | - public function getName(): string { |
|
53 | - return $this->l->t('Personal info'); |
|
54 | - } |
|
52 | + public function getName(): string { |
|
53 | + return $this->l->t('Personal info'); |
|
54 | + } |
|
55 | 55 | |
56 | - public function getPriority(): int { |
|
57 | - return 0; |
|
58 | - } |
|
56 | + public function getPriority(): int { |
|
57 | + return 0; |
|
58 | + } |
|
59 | 59 | } |
@@ -34,35 +34,35 @@ |
||
34 | 34 | |
35 | 35 | class Password implements ISettings { |
36 | 36 | |
37 | - /** @var IUserManager */ |
|
38 | - private $userManager; |
|
37 | + /** @var IUserManager */ |
|
38 | + private $userManager; |
|
39 | 39 | |
40 | - /** @var string|null */ |
|
41 | - private $uid; |
|
40 | + /** @var string|null */ |
|
41 | + private $uid; |
|
42 | 42 | |
43 | - public function __construct(IUserManager $userManager, |
|
44 | - ?string $UserId) { |
|
45 | - $this->userManager = $userManager; |
|
46 | - $this->uid = $UserId; |
|
47 | - } |
|
43 | + public function __construct(IUserManager $userManager, |
|
44 | + ?string $UserId) { |
|
45 | + $this->userManager = $userManager; |
|
46 | + $this->uid = $UserId; |
|
47 | + } |
|
48 | 48 | |
49 | - public function getForm(): TemplateResponse { |
|
50 | - $user = $this->userManager->get($this->uid); |
|
51 | - $passwordChangeSupported = false; |
|
52 | - if ($user !== null) { |
|
53 | - $passwordChangeSupported = $user->canChangePassword(); |
|
54 | - } |
|
49 | + public function getForm(): TemplateResponse { |
|
50 | + $user = $this->userManager->get($this->uid); |
|
51 | + $passwordChangeSupported = false; |
|
52 | + if ($user !== null) { |
|
53 | + $passwordChangeSupported = $user->canChangePassword(); |
|
54 | + } |
|
55 | 55 | |
56 | - return new TemplateResponse('settings', 'settings/personal/security/password', [ |
|
57 | - 'passwordChangeSupported' => $passwordChangeSupported, |
|
58 | - ]); |
|
59 | - } |
|
56 | + return new TemplateResponse('settings', 'settings/personal/security/password', [ |
|
57 | + 'passwordChangeSupported' => $passwordChangeSupported, |
|
58 | + ]); |
|
59 | + } |
|
60 | 60 | |
61 | - public function getSection(): string { |
|
62 | - return 'security'; |
|
63 | - } |
|
61 | + public function getSection(): string { |
|
62 | + return 'security'; |
|
63 | + } |
|
64 | 64 | |
65 | - public function getPriority(): int { |
|
66 | - return 10; |
|
67 | - } |
|
65 | + public function getPriority(): int { |
|
66 | + return 10; |
|
67 | + } |
|
68 | 68 | } |