File tree Expand file tree Collapse file tree 4 files changed +0
-52
lines changed Expand file tree Collapse file tree 4 files changed +0
-52
lines changed Original file line number Diff line number Diff line change 4
4
5
5
abstract class AbstractMenuItemType
6
6
{
7
- protected ?string $ icon = null ;
8
-
9
- public function getIcon (): ?string
10
- {
11
- return $ this ->icon ;
12
- }
13
-
14
- public function icon (?string $ icon ): static
15
- {
16
- $ this ->icon = $ icon ;
17
-
18
- return $ this ;
19
- }
20
-
21
7
abstract public function getAlias (): string ;
22
8
23
9
public function isUrlType (): bool
Original file line number Diff line number Diff line change @@ -18,14 +18,6 @@ class LinkableMenuItemType extends AbstractMenuItemType
18
18
public function __construct (string $ model )
19
19
{
20
20
$ this ->model = $ model ;
21
- $ this ->icon = 'heroicon-o-link ' ;
22
-
23
- // Set icon based on model if it has a getMorphClass method
24
- $ modelInstance = app ($ model );
25
- if (method_exists ($ modelInstance , 'getMorphClass ' )) {
26
- $ morphClass = $ modelInstance ->getMorphClass ();
27
- $ this ->icon = $ this ->getIconForMorphClass ($ morphClass );
28
- }
29
21
}
30
22
31
23
public static function make (string $ model ): static
@@ -122,26 +114,6 @@ protected function getHelperText(): string
122
114
]);
123
115
}
124
116
125
- protected function getIconForMorphClass (string $ morphClass ): string
126
- {
127
- // Check config for exact morph class match
128
- $ configuredIcons = FilamentFlexibleContentBlockPages::config ()
129
- ->getMenuModelIcons ();
130
-
131
- if (isset ($ configuredIcons [$ morphClass ])) {
132
- return $ configuredIcons [$ morphClass ];
133
- }
134
-
135
- // Fallback to pattern matching for backwards compatibility
136
- foreach ($ configuredIcons as $ pattern => $ icon ) {
137
- if (str_contains ($ morphClass , $ pattern )) {
138
- return $ icon ;
139
- }
140
- }
141
-
142
- // Final fallback to default icon
143
- return 'heroicon-o-link ' ;
144
- }
145
117
146
118
public function isModelType (): bool
147
119
{
Original file line number Diff line number Diff line change @@ -9,11 +9,6 @@ class RouteMenuItemType extends AbstractMenuItemType
9
9
{
10
10
const TYPE_ROUTE = 'route ' ;
11
11
12
- public function __construct ()
13
- {
14
- $ this ->icon = 'heroicon-o-map ' ;
15
- }
16
-
17
12
public static function make (?string $ model = null ): static
18
13
{
19
14
return new static ;
Original file line number Diff line number Diff line change @@ -8,11 +8,6 @@ class UrlMenuItemType extends AbstractMenuItemType
8
8
{
9
9
const TYPE_URL = 'url ' ;
10
10
11
- public function __construct ()
12
- {
13
- $ this ->icon = 'heroicon-o-link ' ;
14
- }
15
-
16
11
public static function make (?string $ model = null ): static
17
12
{
18
13
return new static ;
You can’t perform that action at this time.
0 commit comments