-
-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Marcel Klehr <[email protected]>
- Loading branch information
1 parent
76668cc
commit b587fee
Showing
2 changed files
with
58 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,80 +1,72 @@ | ||
<?php | ||
|
||
namespace OCA\Photos\Dashboard; | ||
|
||
use OCA\Photos\AppInfo\Application; | ||
use OCP\AppFramework\Services\IInitialState; | ||
use OCP\IInitialStateService; | ||
use OCP\Util; | ||
|
||
class OnThisDay implements \OCP\Dashboard\IWidget | ||
{ | ||
/** | ||
* @var \OCP\IL10N | ||
*/ | ||
private $l; | ||
/** | ||
* @var \OCP\IURLGenerator | ||
*/ | ||
private $url; | ||
/** | ||
* @var \OCP\AppFramework\Services\IInitialState | ||
*/ | ||
private $initialState; | ||
class OnThisDay implements \OCP\Dashboard\IWidget { | ||
/** | ||
* @var \OCP\IL10N | ||
*/ | ||
private $l; | ||
/** | ||
* @var \OCP\IURLGenerator | ||
*/ | ||
private $url; | ||
/** | ||
* @var \OCP\AppFramework\Services\IInitialState | ||
*/ | ||
private $initialState; | ||
|
||
public function __construct(\OCP\IL10N $l, \OCP\IURLGenerator $url, IInitialStateService $initialState) | ||
{ | ||
$this->l = $l; | ||
$this->url = $url; | ||
$this->initialState = $initialState; | ||
} | ||
public function __construct(\OCP\IL10N $l, \OCP\IURLGenerator $url, IInitialStateService $initialState) { | ||
$this->l = $l; | ||
$this->url = $url; | ||
$this->initialState = $initialState; | ||
Check failure on line 26 in lib/Dashboard/OnThisDay.php GitHub Actions / NextcloudInvalidPropertyAssignmentValue
|
||
} | ||
|
||
/** | ||
* @inheritDoc | ||
*/ | ||
public function getId(): string | ||
{ | ||
return 'photos.onthisday'; | ||
} | ||
/** | ||
* @inheritDoc | ||
*/ | ||
public function getId(): string { | ||
return 'photos.onthisday'; | ||
} | ||
|
||
/** | ||
* @inheritDoc | ||
*/ | ||
public function getTitle(): string | ||
{ | ||
return $this->l->t('On This Day'); | ||
} | ||
/** | ||
* @inheritDoc | ||
*/ | ||
public function getTitle(): string { | ||
return $this->l->t('On This Day'); | ||
} | ||
|
||
/** | ||
* @inheritDoc | ||
*/ | ||
public function getOrder(): int | ||
{ | ||
return 20; | ||
} | ||
/** | ||
* @inheritDoc | ||
*/ | ||
public function getOrder(): int { | ||
return 20; | ||
} | ||
|
||
/** | ||
* @inheritDoc | ||
*/ | ||
public function getIconClass(): string | ||
{ | ||
return 'icon-calendar-dark'; | ||
} | ||
/** | ||
* @inheritDoc | ||
*/ | ||
public function getIconClass(): string { | ||
return 'icon-calendar-dark'; | ||
} | ||
|
||
/** | ||
* @inheritDoc | ||
*/ | ||
public function getUrl(): ?string | ||
{ | ||
return $this->url->linkToRoute('photos.page.indexthisday'); | ||
} | ||
/** | ||
* @inheritDoc | ||
*/ | ||
public function getUrl(): ?string { | ||
return $this->url->linkToRoute('photos.page.indexthisday'); | ||
} | ||
|
||
/** | ||
* @inheritDoc | ||
*/ | ||
public function load(): void | ||
{ | ||
Util::addScript('photos', 'photos-dashboard'); | ||
$this->initialState->provideInitialState('photos', 'image-mimes', Application::IMAGE_MIMES); | ||
$this->initialState->provideInitialState('photos', 'video-mimes', Application::VIDEO_MIMES); | ||
} | ||
/** | ||
* @inheritDoc | ||
*/ | ||
public function load(): void { | ||
Util::addScript('photos', 'photos-dashboard'); | ||
$this->initialState->provideInitialState('photos', 'image-mimes', Application::IMAGE_MIMES); | ||
Check failure on line 69 in lib/Dashboard/OnThisDay.php GitHub Actions / NextcloudTooManyArguments
|
||
$this->initialState->provideInitialState('photos', 'video-mimes', Application::VIDEO_MIMES); | ||
Check failure on line 70 in lib/Dashboard/OnThisDay.php GitHub Actions / NextcloudTooManyArguments
|
||
} | ||
} |