From 3382efd4220d20dd9a3e5cb95392024ce77038b8 Mon Sep 17 00:00:00 2001 From: Morris Jobke Date: Tue, 24 Jan 2017 11:19:21 -0600 Subject: Add icon to admin page sidebar * follow up to nextcloud/server#3151 Signed-off-by: Morris Jobke --- lib/Settings/AdminSection.php | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'lib') diff --git a/lib/Settings/AdminSection.php b/lib/Settings/AdminSection.php index 3a4ed84..28a0cf9 100644 --- a/lib/Settings/AdminSection.php +++ b/lib/Settings/AdminSection.php @@ -24,15 +24,19 @@ namespace OCA\Survey_Client\Settings; use OCP\IL10N; -use OCP\Settings\ISection; +use OCP\IURLGenerator; +use OCP\Settings\IIconSection; -class AdminSection implements ISection { +class AdminSection 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; } /** @@ -63,4 +67,10 @@ class AdminSection implements ISection { return 80; } + /** + * {@inheritdoc} + */ + public function getIcon() { + return $this->url->imagePath('survey_client', 'app-dark.svg'); + } } -- cgit v1.2.3