File tree Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Original file line number Diff line number Diff line change @@ -300,4 +300,31 @@ public function getName()
300
300
301
301
}
302
302
303
+ /**
304
+ * change the icon color depending on the kernel version
305
+ *
306
+ * #3f3f3f < 2.8
307
+ * #AAAAAA >= 2.8
308
+ *
309
+ * @return string
310
+ */
311
+ public final function getIconColor ()
312
+ {
313
+ if ((float )$ this ->getSymfonyVersion () >= 2.8 ) {
314
+ return $ this ->data ['iconColor ' ] = '#AAAAAA ' ;
315
+ }
316
+ return $ this ->data ['iconColor ' ] = '#3F3F3F ' ;#3F3F3F
317
+ }
318
+
319
+ /**
320
+ * @return string
321
+ */
322
+ private function getSymfonyVersion ()
323
+ {
324
+ $ symfonyVersion = \Symfony \Component \HttpKernel \Kernel::VERSION ;
325
+ $ symfonyVersion = explode ('. ' , $ symfonyVersion , -1 );
326
+ $ symfonyMajorMinorVersion = implode ('. ' , $ symfonyVersion );
327
+ return $ symfonyMajorMinorVersion ;
328
+ }
329
+
303
330
}
You can’t perform that action at this time.
0 commit comments