diff options
author | Julius Haertl <jus@bitgrid.net> | 2017-01-30 12:59:55 +0300 |
---|---|---|
committer | Julius Haertl <jus@bitgrid.net> | 2017-01-30 12:59:55 +0300 |
commit | ef2effb7eb8c237bb2c186190b8a8b7ec88ef4d4 (patch) | |
tree | 486b97981de2ab33bfc48397dcba39650aeae284 | |
parent | b51354506ecb36f5aa51e2476a0d1a1f6e7ec567 (diff) |
Add icon for settings section in NC12
-rw-r--r-- | img/app-dark.svg | 1 | ||||
-rw-r--r-- | lib/Settings/Section.php | 14 |
2 files changed, 12 insertions, 3 deletions
diff --git a/img/app-dark.svg b/img/app-dark.svg new file mode 100644 index 0000000..2e3ad4d --- /dev/null +++ b/img/app-dark.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" height="32" width="32"><path d="M13.633 2.373h5.006v18.731h-5.006zm0 21.878h5.006v5.512h-5.006z" fill="#000"/></svg> diff --git a/lib/Settings/Section.php b/lib/Settings/Section.php index 3bda81d..744862d 100644 --- a/lib/Settings/Section.php +++ b/lib/Settings/Section.php @@ -24,15 +24,19 @@ namespace OCA\IssueTemplate\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 $urlGenerator; - public function __construct(IL10N $l) { + public function __construct(IL10N $l, IURLGenerator $urlGenerator) { $this->l = $l; + $this->urlGenerator = $urlGenerator; } public function getID() { @@ -46,4 +50,8 @@ class Section implements ISection { public function getPriority() { return 30; } + + public function getIcon() { + return $this->urlGenerator->imagePath('issuetemplate', 'app-dark.svg'); + } } |