File tree 2 files changed +19
-0
lines changed
2 files changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,8 @@ trait Configuration
11
11
*/
12
12
protected Closure | string $ navigationGroupLabel = 'Pontus ' ;
13
13
14
+ protected array $ hideResources = [];
15
+
14
16
public function navigationGroupLabel (Closure | string $ label ): static
15
17
{
16
18
$ this ->navigationGroupLabel = $ label ;
@@ -22,4 +24,16 @@ public function getNavigationGroupLabel(): Closure | string
22
24
{
23
25
return $ this ->evaluate ($ this ->navigationGroupLabel );
24
26
}
27
+
28
+ public function hideResources (array $ resources ): static
29
+ {
30
+ $ this ->hideResources = $ resources ;
31
+
32
+ return $ this ;
33
+ }
34
+
35
+ public function getHiddenResources (): ?array
36
+ {
37
+ return $ this ->hideResources ;
38
+ }
25
39
}
Original file line number Diff line number Diff line change @@ -11,4 +11,9 @@ public static function getNavigationGroup(): ?string
11
11
{
12
12
return PontusPlugin::get ()->getNavigationGroupLabel ();
13
13
}
14
+
15
+ public static function shouldRegisterNavigation (): bool
16
+ {
17
+ return ! in_array (static ::class, PontusPlugin::get ()->getHiddenResources ());
18
+ }
14
19
}
You can’t perform that action at this time.
0 commit comments