Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions img/app-dark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
28 changes: 25 additions & 3 deletions lib/Settings/AdminSection.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,26 @@


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;

public function __construct(IL10N $l) {
/** @var IURLGenerator */
private $urlGenerator;

/**
* AdminSection constructor.
*
* @param IL10N $l
* @param IURLGenerator $urlGenerator
*/
public function __construct(IL10N $l, IURLGenerator $urlGenerator) {
$this->l = $l;
$this->urlGenerator = $urlGenerator;
}

/**
Expand Down Expand Up @@ -65,4 +76,15 @@ public function getPriority() {
return 0;
}

/**
* returns the relative path to an 16*16 icon describing the section.
* e.g. '/core/img/places/files.svg'
*
* @returns string
* @since 12
*/
public function getIcon() {
return $this->urlGenerator->imagePath('serverinfo', 'app-dark.svg');
}

}