1 | <?php |
||
2 | |||
3 | namespace Xiidea\EasyConfigBundle\Services\FormGroup; |
||
4 | |||
5 | use Symfony\Component\Routing\Generator\UrlGeneratorInterface; |
||
6 | use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface; |
||
7 | use Xiidea\EasyConfigBundle\Utility\StringUtil; |
||
8 | |||
9 | abstract class BaseConfigGroup implements ConfigGroupInterface |
||
10 | { |
||
11 | protected static TokenStorageInterface $tokenStorage; |
||
12 | protected static UrlGeneratorInterface $urlGenerator; |
||
13 | |||
14 | public function __construct(TokenStorageInterface $tokenStorage, UrlGeneratorInterface $urlGenerator) |
||
15 | { |
||
16 | self::$tokenStorage = $tokenStorage; |
||
17 | self::$urlGenerator = $urlGenerator; |
||
18 | } |
||
19 | |||
20 | public function getLabel(): string |
||
21 | { |
||
22 | return StringUtil::getLabelFromClass(get_called_class()); |
||
23 | } |
||
24 | |||
25 | public function getNameSpace(): string |
||
26 | { |
||
27 | return 'app'; |
||
28 | } |
||
29 | |||
30 | public function getAuthorSecurityLevels(): ?string |
||
31 | { |
||
32 | return null; |
||
33 | } |
||
34 | |||
35 | public function getViewSecurityLevels(): ?string |
||
36 | { |
||
37 | return null; |
||
38 | } |
||
39 | |||
40 | public function getRouteName(): ?string |
||
41 | { |
||
42 | return 'xiidea_easy_config_form'; |
||
43 | } |
||
44 | |||
45 | public function getName(): ?string |
||
46 | { |
||
47 | return 'name'; |
||
48 | } |
||
49 | |||
50 | public function getGroupKey(): ?string |
||
51 | { |
||
52 | return 'miscellaneous'; |
||
53 | } |
||
54 | |||
55 | public function getGroupLabel(): ?string |
||
56 | { |
||
57 | return StringUtil::humanize(static::getGroupKey()); |
||
0 ignored issues
–
show
Bug
Best Practice
introduced
by
![]() |
|||
58 | } |
||
59 | |||
60 | public function getGroupIcon(): ?string |
||
61 | { |
||
62 | return null; |
||
63 | } |
||
64 | |||
65 | public function getPriority(): int |
||
66 | { |
||
67 | return 0; |
||
68 | } |
||
69 | } |
||
70 |