@@ -54,6 +54,11 @@ abstract class BaseCollector
5454 */
5555 protected string $ key = '' ;
5656
57+ /**
58+ * Le fichier de vue à utiliser pour rendre l'onglet du collector
59+ */
60+ protected string $ view = '' ;
61+
5762 /**
5863 * Obtient le titre du collecteur
5964 */
@@ -78,6 +83,18 @@ public function getKey(): string
7883 return str_replace (' ' , '- ' , strtolower ($ this ->key ));
7984 }
8085
86+ /**
87+ * Obtient le fichier de vue à utiliser pour rendre l'onglet du collector
88+ */
89+ public function getView (): string
90+ {
91+ if ($ this ->view === '' ) {
92+ $ this ->view = "_ {$ this ->getKey ()}.tpl " ;
93+ }
94+
95+ return $ this ->view ;
96+ }
97+
8198 /**
8299 * Renvoie toute information devant être affichée à côté du titre.
83100 */
@@ -218,6 +235,7 @@ public function getAsArray(): array
218235 'title ' => $ this ->getTitle (),
219236 'titleSafe ' => $ this ->getTitle (true ),
220237 'key ' => $ this ->getKey (),
238+ 'view ' => $ this ->getView (),
221239 'titleDetails ' => $ this ->getTitleDetails (),
222240 'display ' => $ this ->display (),
223241 'badgeValue ' => $ this ->getBadgeValue (),
0 commit comments