From 82a6b16c0e96f7d7a64566f08e6bebbc75956760 Mon Sep 17 00:00:00 2001 From: Morris Jobke Date: Tue, 24 Jan 2017 12:11:49 -0600 Subject: [PATCH] Add icon to admin page sidebar * follow up to nextcloud/server#3151 Signed-off-by: Morris Jobke --- img/app-dark.svg | 4 ++++ lib/Settings/Section.php | 17 ++++++++++++++--- 2 files changed, 18 insertions(+), 3 deletions(-) create mode 100644 img/app-dark.svg diff --git a/img/app-dark.svg b/img/app-dark.svg new file mode 100644 index 00000000..2a3c8244 --- /dev/null +++ b/img/app-dark.svg @@ -0,0 +1,4 @@ + + + + diff --git a/lib/Settings/Section.php b/lib/Settings/Section.php index 4ec63d23..853e8b88 100644 --- a/lib/Settings/Section.php +++ b/lib/Settings/Section.php @@ -22,14 +22,18 @@ namespace OCA\FilesAccessControl\Settings; use OCP\IL10N; -use OCP\Settings\ISection; +use OCP\IURLGenerator; +use OCP\Settings\IIconSection; -class Section implements ISection { +class Section implements IIconSection { /** @var IL10N */ private $l; + /** @var IURLGenerator */ + private $url; - public function __construct(IL10N $l) { + public function __construct(IL10N $l, IURLGenerator $url) { $this->l = $l; + $this->url = $url; } /** @@ -62,4 +66,11 @@ public function getName() { public function getPriority() { return 70; } + + /** + * {@inheritdoc} + */ + public function getIcon() { + return $this->url->imagePath('files_accesscontrol', 'app-dark.svg'); + } }