/
PersonalSection.php
70 lines (62 loc) · 1.39 KB
/
PersonalSection.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
<?php
/**
* Audio Player
*
* This file is licensed under the Affero General Public License version 3 or
* later. See the LICENSE.md file.
*
* @author Marcel Scherello <audioplayer@scherello.de>
* @copyright 2016-2021 Marcel Scherello
*/
namespace OCA\audioplayer\Settings;
use OCP\IL10N;
use OCP\IURLGenerator;
use OCP\Settings\IIconSection;
class PersonalSection implements IIconSection
{
/** @var IURLGenerator */
private $urlGenerator;
/** @var IL10N */
private $l;
public function __construct(IURLGenerator $urlGenerator, IL10N $l)
{
$this->urlGenerator = $urlGenerator;
$this->l = $l;
}
/**
* returns the relative path to an 16*16 icon describing the section.
*
* @returns string
*/
public function getIcon()
{
return $this->urlGenerator->imagePath('audioplayer', 'app-dark.svg');
}
/**
* returns the ID of the section. It is supposed to be a lower case string,
*
* @returns string
*/
public function getID()
{
return 'audioplayer';
}
/**
* returns the translated name as it should be displayed
*
* @return string
*/
public function getName()
{
return $this->l->t('Audio Player');
}
/**
* returns priority for positioning
*
* @return int
*/
public function getPriority()
{
return 10;
}
}