File tree Expand file tree Collapse file tree 3 files changed +7
-7
lines changed
bundle/DependencyInjection/Configuration/Parser Expand file tree Collapse file tree 3 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -48,7 +48,7 @@ public function addSemanticConfig(NodeBuilder $nodeBuilder): void
48
48
->scalarNode ('default_icon_set ' )
49
49
->isRequired ()
50
50
->end ()
51
- ->arrayNode ('icon_map ' )
51
+ ->arrayNode ('icon_aliases ' )
52
52
->useAttributeAsKey ('name ' )
53
53
->scalarPrototype ()->end ()
54
54
->end ()
Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ public function __construct(
38
38
39
39
public function resolve (string $ icon , ?string $ set = null ): string
40
40
{
41
- $ icon = $ this ->iconMapping ($ icon );
41
+ $ icon = $ this ->resolveIconAlias ($ icon );
42
42
43
43
if (isset ($ this ->iconCache [$ set ][$ icon ])) {
44
44
return $ this ->iconCache [$ set ][$ icon ];
@@ -65,11 +65,11 @@ public function onConfigScopeChange(ScopeChangeEvent $event): void
65
65
$ this ->iconCache = [];
66
66
}
67
67
68
- private function iconMapping (string $ icon ): string
68
+ private function resolveIconAlias (string $ icon ): string
69
69
{
70
- $ iconsMap = $ this ->configResolver ->getParameter ('assets.icon_map ' );
71
- if (isset ($ iconsMap [$ icon ])) {
72
- return $ iconsMap [$ icon ];
70
+ $ iconAliases = $ this ->configResolver ->getParameter ('assets.icon_aliases ' );
71
+ if (isset ($ iconAliases [$ icon ])) {
72
+ return $ iconAliases [$ icon ];
73
73
}
74
74
75
75
return $ icon ;
Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ public function getConfig(): array
28
28
return [
29
29
'iconSets ' => $ this ->configResolver ->getParameter ('assets.icon_sets ' ),
30
30
'defaultIconSet ' => $ this ->configResolver ->getParameter ('assets.default_icon_set ' ),
31
- 'iconMap ' => $ this ->configResolver ->getParameter ('assets.icon_map ' ),
31
+ 'iconAliases ' => $ this ->configResolver ->getParameter ('assets.icon_aliases ' ),
32
32
];
33
33
}
34
34
}
You can’t perform that action at this time.
0 commit comments