Completed
Push — master ( c8219c...a2e3fa )
by Joas
10s
created

Setting::getPriority()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 3
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
crap 1
1
<?php
2
/**
3
 * @copyright Copyright (c) 2016 Joas Schilling <[email protected]>
4
 *
5
 * @license GNU AGPL version 3 or any later version
6
 *
7
 * This program is free software: you can redistribute it and/or modify
8
 * it under the terms of the GNU Affero General Public License as
9
 * published by the Free Software Foundation, either version 3 of the
10
 * License, or (at your option) any later version.
11
 *
12
 * This program is distributed in the hope that it will be useful,
13
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15
 * GNU Affero General Public License for more details.
16
 *
17
 * You should have received a copy of the GNU Affero General Public License
18
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
19
 *
20
 */
21
22
namespace OCA\AnnouncementCenter\Activity;
23
24
25
use OCP\Activity\ISetting;
26
use OCP\IL10N;
27
28
class Setting implements ISetting {
29
30
	/** @var IL10N */
31
	protected $l;
32
33
	/**
34
	 * @param IL10N $l
35
	 */
36 2
	public function __construct(IL10N $l) {
37 2
		$this->l = $l;
38 2
	}
39
40
	/**
41
	 * @return string Lowercase a-z and underscore only identifier
42
	 * @since 11.0.0
43
	 */
44 1
	public function getIdentifier() {
45 1
		return 'announcementcenter';
46
	}
47
48
	/**
49
	 * @return string A translated string
50
	 * @since 11.0.0
51
	 */
52 1
	public function getName() {
53 1
		return $this->l->t('An <strong>announcement</strong> is posted by an administrator');
54
	}
55
56
	/**
57
	 * @return int whether the filter should be rather on the top or bottom of
58
	 * the admin section. The filters are arranged in ascending order of the
59
	 * priority values. It is required to return a value between 0 and 100.
60
	 * @since 11.0.0
61
	 */
62 1
	public function getPriority() {
63 1
		return 70;
64
	}
65
66
	/**
67
	 * @return bool True when the option can be changed for the stream
68
	 * @since 11.0.0
69
	 */
70 1
	public function canChangeStream() {
71 1
		return false;
72
	}
73
74
	/**
75
	 * @return bool True when the option can be changed for the stream
76
	 * @since 11.0.0
77
	 */
78 1
	public function isDefaultEnabledStream() {
79 1
		return true;
80
	}
81
82
	/**
83
	 * @return bool True when the option can be changed for the mail
84
	 * @since 11.0.0
85
	 */
86 1
	public function canChangeMail() {
87 1
		return true;
88
	}
89
90
	/**
91
	 * @return bool True when the option can be changed for the stream
92
	 * @since 11.0.0
93
	 */
94 1
	public function isDefaultEnabledMail() {
95 1
		return true;
96
	}
97
}
98
99