Total Complexity | 5 |
Total Lines | 40 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
25 | class WidgetGroup |
||
26 | { |
||
27 | /** |
||
28 | * @var string |
||
29 | */ |
||
30 | protected $identifier; |
||
31 | |||
32 | /** |
||
33 | * @var string |
||
34 | */ |
||
35 | protected $title; |
||
36 | |||
37 | public function __construct(string $identifier, string $title) |
||
38 | { |
||
39 | $this->identifier = $identifier; |
||
40 | $this->title = $title; |
||
41 | } |
||
42 | |||
43 | /** |
||
44 | * @return string |
||
45 | */ |
||
46 | public function getIdentifier(): string |
||
49 | } |
||
50 | |||
51 | /** |
||
52 | * @return string |
||
53 | */ |
||
54 | public function getTitle(): string |
||
55 | { |
||
56 | return $this->getLanguageService()->sl($this->title) ?: $this->title; |
||
57 | } |
||
58 | |||
59 | /** |
||
60 | * @return LanguageService |
||
61 | */ |
||
62 | protected function getLanguageService(): LanguageService |
||
65 | } |
||
66 | } |
||
67 |