2020use App \Model \LogFile ;
2121use App \Model \LogLevel ;
2222use App \Pdf \Colors \PdfTextColor ;
23- use App \Pdf \Html \HtmlBootstrapColor ;
2423use App \Pdf \PdfCell ;
2524use App \Pdf \PdfColumn ;
2625use App \Pdf \PdfFontAwesomeCell ;
2726use App \Pdf \PdfStyle ;
2827use App \Pdf \PdfTable ;
2928use App \Pdf \Traits \PdfMemoryImageTrait ;
30- use App \Service \FontAwesomeImageService ;
31- use App \Service \FontAwesomeService ;
29+ use App \Service \FontAwesomeCellService ;
3230use App \Utils \FormatUtils ;
3331use App \Utils \StringUtils ;
3432use fpdf \Enums \PdfMove ;
@@ -57,7 +55,7 @@ public function __construct(
5755 DocumentHelperInterface $ helper ,
5856 private readonly LogFile $ logFile ,
5957 string $ relativePath ,
60- private readonly FontAwesomeService $ service
58+ private readonly FontAwesomeCellService $ service
6159 ) {
6260 parent ::__construct ($ helper , PdfOrientation::LANDSCAPE );
6361 $ this ->setTranslatedTitle ('log.title ' )
@@ -111,7 +109,7 @@ private function getCell(string $text, FontAwesomeIcon $icon, ?string $color = n
111109 if (isset ($ this ->cells [$ key ])) {
112110 return $ this ->cells [$ key ];
113111 }
114- $ cell = $ this ->service ->getFontAwesomeCell (icon: $ icon , color: $ color , text: $ text ) ?? $ text ;
112+ $ cell = $ this ->service ->getCell (icon: $ icon , color: $ color , text: $ text ) ?? $ text ;
115113
116114 return $ this ->cells [$ key ] = $ cell ;
117115 }
@@ -144,7 +142,7 @@ private function getImageIcon(LogLevel|LogChannel $value, string $text): PdfCell
144142 }
145143
146144 $ alignment = PdfTextAlignment::CENTER ;
147- $ cell = $ this ->service ->getFontAwesomeCell (
145+ $ cell = $ this ->service ->getCell (
148146 icon: $ icon ,
149147 color: $ color ,
150148 text: $ text ,
@@ -162,9 +160,9 @@ private function getLevelColor(string $level): string
162160 if (\array_key_exists ($ level , $ this ->colors )) {
163161 return $ this ->colors [$ level ];
164162 }
165-
166- $ levelColor = LogLevel:: instance ( $ level )-> getLevelColor ();
167- $ color = HtmlBootstrapColor:: parseTextColor ( $ levelColor )? ->asHex('# ' ) ?? FontAwesomeImageService:: BLACK_COLOR ;
163+ $ color = LogLevel:: instance ( $ level )
164+ -> getLevelBootstrapColor ()
165+ ->asHex ('# ' );
168166
169167 return $ this ->colors [$ level ] = $ color ;
170168 }
0 commit comments