|
1 | 1 | <?php |
| 2 | + |
2 | 3 | namespace OCA\Photos\Dashboard; |
3 | 4 |
|
4 | 5 | use OCA\Photos\AppInfo\Application; |
5 | | -use OCP\AppFramework\Services\IInitialState; |
6 | 6 | use OCP\IInitialStateService; |
7 | 7 | use OCP\Util; |
8 | 8 |
|
9 | | -class OnThisDay implements \OCP\Dashboard\IWidget |
10 | | -{ |
11 | | - /** |
12 | | - * @var \OCP\IL10N |
13 | | - */ |
14 | | - private $l; |
15 | | - /** |
16 | | - * @var \OCP\IURLGenerator |
17 | | - */ |
18 | | - private $url; |
19 | | - /** |
20 | | - * @var \OCP\AppFramework\Services\IInitialState |
21 | | - */ |
22 | | - private $initialState; |
| 9 | +class OnThisDay implements \OCP\Dashboard\IWidget { |
| 10 | + /** |
| 11 | + * @var \OCP\IL10N |
| 12 | + */ |
| 13 | + private $l; |
| 14 | + /** |
| 15 | + * @var \OCP\IURLGenerator |
| 16 | + */ |
| 17 | + private $url; |
| 18 | + /** |
| 19 | + * @var \OCP\AppFramework\Services\IInitialState |
| 20 | + */ |
| 21 | + private $initialState; |
23 | 22 |
|
24 | | - public function __construct(\OCP\IL10N $l, \OCP\IURLGenerator $url, IInitialStateService $initialState) |
25 | | - { |
26 | | - $this->l = $l; |
27 | | - $this->url = $url; |
28 | | - $this->initialState = $initialState; |
29 | | - } |
| 23 | + public function __construct(\OCP\IL10N $l, \OCP\IURLGenerator $url, IInitialStateService $initialState) { |
| 24 | + $this->l = $l; |
| 25 | + $this->url = $url; |
| 26 | + $this->initialState = $initialState; |
| 27 | + } |
30 | 28 |
|
31 | | - /** |
32 | | - * @inheritDoc |
33 | | - */ |
34 | | - public function getId(): string |
35 | | - { |
36 | | - return 'photos.onthisday'; |
37 | | - } |
| 29 | + /** |
| 30 | + * @inheritDoc |
| 31 | + */ |
| 32 | + public function getId(): string { |
| 33 | + return 'photos.onthisday'; |
| 34 | + } |
38 | 35 |
|
39 | | - /** |
40 | | - * @inheritDoc |
41 | | - */ |
42 | | - public function getTitle(): string |
43 | | - { |
44 | | - return $this->l->t('On This Day'); |
45 | | - } |
| 36 | + /** |
| 37 | + * @inheritDoc |
| 38 | + */ |
| 39 | + public function getTitle(): string { |
| 40 | + return $this->l->t('On This Day'); |
| 41 | + } |
46 | 42 |
|
47 | | - /** |
48 | | - * @inheritDoc |
49 | | - */ |
50 | | - public function getOrder(): int |
51 | | - { |
52 | | - return 20; |
53 | | - } |
| 43 | + /** |
| 44 | + * @inheritDoc |
| 45 | + */ |
| 46 | + public function getOrder(): int { |
| 47 | + return 20; |
| 48 | + } |
54 | 49 |
|
55 | | - /** |
56 | | - * @inheritDoc |
57 | | - */ |
58 | | - public function getIconClass(): string |
59 | | - { |
60 | | - return 'icon-calendar-dark'; |
61 | | - } |
| 50 | + /** |
| 51 | + * @inheritDoc |
| 52 | + */ |
| 53 | + public function getIconClass(): string { |
| 54 | + return 'icon-calendar-dark'; |
| 55 | + } |
62 | 56 |
|
63 | | - /** |
64 | | - * @inheritDoc |
65 | | - */ |
66 | | - public function getUrl(): ?string |
67 | | - { |
68 | | - return $this->url->linkToRoute('photos.page.indexthisday'); |
69 | | - } |
| 57 | + /** |
| 58 | + * @inheritDoc |
| 59 | + */ |
| 60 | + public function getUrl(): ?string { |
| 61 | + return $this->url->linkToRoute('photos.page.indexthisday'); |
| 62 | + } |
70 | 63 |
|
71 | | - /** |
72 | | - * @inheritDoc |
73 | | - */ |
74 | | - public function load(): void |
75 | | - { |
76 | | - Util::addScript('photos', 'photos-dashboard'); |
77 | | - $this->initialState->provideInitialState('photos', 'image-mimes', Application::IMAGE_MIMES); |
78 | | - $this->initialState->provideInitialState('photos', 'video-mimes', Application::VIDEO_MIMES); |
79 | | - } |
| 64 | + /** |
| 65 | + * @inheritDoc |
| 66 | + */ |
| 67 | + public function load(): void { |
| 68 | + Util::addScript('photos', 'photos-dashboard'); |
| 69 | + $this->initialState->provideInitialState('photos', 'image-mimes', Application::IMAGE_MIMES); |
| 70 | + $this->initialState->provideInitialState('photos', 'video-mimes', Application::VIDEO_MIMES); |
| 71 | + } |
80 | 72 | } |
0 commit comments