diff options
Diffstat (limited to 'lib/private/Settings/Section.php')
-rw-r--r-- | lib/private/Settings/Section.php | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/lib/private/Settings/Section.php b/lib/private/Settings/Section.php index b3cf242279f..c89a3999c4e 100644 --- a/lib/private/Settings/Section.php +++ b/lib/private/Settings/Section.php @@ -23,25 +23,29 @@ namespace OC\Settings; -use OCP\Settings\ISection; +use OCP\Settings\IIconSection; -class Section implements ISection { +class Section implements IIconSection { /** @var string */ private $id; /** @var string */ private $name; /** @var int */ private $priority; + /** @var string */ + private $icon; /** * @param string $id * @param string $name * @param int $priority + * @param string $icon */ - public function __construct($id, $name, $priority) { + public function __construct($id, $name, $priority, $icon = '') { $this->id = $id; $this->name = $name; $this->priority = $priority; + $this->icon = $icon; } /** @@ -74,4 +78,15 @@ class Section implements ISection { public function getPriority() { return $this->priority; } + + /** + * 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->icon; + } } |