@@ -33,69 +33,69 @@ |
||
33 | 33 | |
34 | 34 | class Personal implements ISettings { |
35 | 35 | |
36 | - /** @var FederatedShareProvider */ |
|
37 | - private $federatedShareProvider; |
|
38 | - /** @var IUserSession */ |
|
39 | - private $userSession; |
|
40 | - /** @var IL10N */ |
|
41 | - private $l; |
|
42 | - /** @var IURLGenerator */ |
|
43 | - private $urlGenerator; |
|
44 | - /** @var \OC_Defaults */ |
|
45 | - private $defaults; |
|
36 | + /** @var FederatedShareProvider */ |
|
37 | + private $federatedShareProvider; |
|
38 | + /** @var IUserSession */ |
|
39 | + private $userSession; |
|
40 | + /** @var IL10N */ |
|
41 | + private $l; |
|
42 | + /** @var IURLGenerator */ |
|
43 | + private $urlGenerator; |
|
44 | + /** @var \OC_Defaults */ |
|
45 | + private $defaults; |
|
46 | 46 | |
47 | - public function __construct( |
|
48 | - FederatedShareProvider $federatedShareProvider, # |
|
49 | - IUserSession $userSession, |
|
50 | - IL10N $l, |
|
51 | - IURLGenerator $urlGenerator, |
|
52 | - \OC_Defaults $defaults |
|
53 | - ) { |
|
54 | - $this->federatedShareProvider = $federatedShareProvider; |
|
55 | - $this->userSession = $userSession; |
|
56 | - $this->l = $l; |
|
57 | - $this->urlGenerator = $urlGenerator; |
|
58 | - $this->defaults = $defaults; |
|
59 | - } |
|
47 | + public function __construct( |
|
48 | + FederatedShareProvider $federatedShareProvider, # |
|
49 | + IUserSession $userSession, |
|
50 | + IL10N $l, |
|
51 | + IURLGenerator $urlGenerator, |
|
52 | + \OC_Defaults $defaults |
|
53 | + ) { |
|
54 | + $this->federatedShareProvider = $federatedShareProvider; |
|
55 | + $this->userSession = $userSession; |
|
56 | + $this->l = $l; |
|
57 | + $this->urlGenerator = $urlGenerator; |
|
58 | + $this->defaults = $defaults; |
|
59 | + } |
|
60 | 60 | |
61 | - /** |
|
62 | - * @return TemplateResponse returns the instance with all parameters set, ready to be rendered |
|
63 | - * @since 9.1 |
|
64 | - */ |
|
65 | - public function getForm() { |
|
66 | - $cloudID = $this->userSession->getUser()->getCloudId(); |
|
67 | - $url = 'https://nextcloud.com/federation#' . $cloudID; |
|
61 | + /** |
|
62 | + * @return TemplateResponse returns the instance with all parameters set, ready to be rendered |
|
63 | + * @since 9.1 |
|
64 | + */ |
|
65 | + public function getForm() { |
|
66 | + $cloudID = $this->userSession->getUser()->getCloudId(); |
|
67 | + $url = 'https://nextcloud.com/federation#' . $cloudID; |
|
68 | 68 | |
69 | - $parameters = [ |
|
70 | - 'outgoingServer2serverShareEnabled' => $this->federatedShareProvider->isOutgoingServer2serverShareEnabled(), |
|
71 | - 'message_with_URL' => $this->l->t('Share with me through my #Nextcloud Federated Cloud ID, see %s', [$url]), |
|
72 | - 'message_without_URL' => $this->l->t('Share with me through my #Nextcloud Federated Cloud ID', [$cloudID]), |
|
73 | - 'logoPath' => $this->urlGenerator->imagePath('core', 'logo.svg'), |
|
74 | - 'reference' => $url, |
|
75 | - 'cloudId' => $cloudID, |
|
76 | - 'color' => $this->defaults->getColorPrimary(), |
|
77 | - 'textColor' => "#ffffff", |
|
78 | - ]; |
|
79 | - return new TemplateResponse('federatedfilesharing', 'settings-personal', $parameters, ''); |
|
80 | - } |
|
69 | + $parameters = [ |
|
70 | + 'outgoingServer2serverShareEnabled' => $this->federatedShareProvider->isOutgoingServer2serverShareEnabled(), |
|
71 | + 'message_with_URL' => $this->l->t('Share with me through my #Nextcloud Federated Cloud ID, see %s', [$url]), |
|
72 | + 'message_without_URL' => $this->l->t('Share with me through my #Nextcloud Federated Cloud ID', [$cloudID]), |
|
73 | + 'logoPath' => $this->urlGenerator->imagePath('core', 'logo.svg'), |
|
74 | + 'reference' => $url, |
|
75 | + 'cloudId' => $cloudID, |
|
76 | + 'color' => $this->defaults->getColorPrimary(), |
|
77 | + 'textColor' => "#ffffff", |
|
78 | + ]; |
|
79 | + return new TemplateResponse('federatedfilesharing', 'settings-personal', $parameters, ''); |
|
80 | + } |
|
81 | 81 | |
82 | - /** |
|
83 | - * @return string the section ID, e.g. 'sharing' |
|
84 | - * @since 9.1 |
|
85 | - */ |
|
86 | - public function getSection() { |
|
87 | - return 'sharing'; |
|
88 | - } |
|
82 | + /** |
|
83 | + * @return string the section ID, e.g. 'sharing' |
|
84 | + * @since 9.1 |
|
85 | + */ |
|
86 | + public function getSection() { |
|
87 | + return 'sharing'; |
|
88 | + } |
|
89 | 89 | |
90 | - /** |
|
91 | - * @return int whether the form should be rather on the top or bottom of |
|
92 | - * the admin section. The forms are arranged in ascending order of the |
|
93 | - * priority values. It is required to return a value between 0 and 100. |
|
94 | - * |
|
95 | - * E.g.: 70 |
|
96 | - * @since 9.1 |
|
97 | - */ |
|
98 | - public function getPriority() { |
|
99 | - return 40; |
|
100 | - } |
|
90 | + /** |
|
91 | + * @return int whether the form should be rather on the top or bottom of |
|
92 | + * the admin section. The forms are arranged in ascending order of the |
|
93 | + * priority values. It is required to return a value between 0 and 100. |
|
94 | + * |
|
95 | + * E.g.: 70 |
|
96 | + * @since 9.1 |
|
97 | + */ |
|
98 | + public function getPriority() { |
|
99 | + return 40; |
|
100 | + } |
|
101 | 101 | } |