N°3882 - Fix null status color when class has no style defined

This commit is contained in:
Molkobain
2021-09-24 14:49:18 +02:00
parent 814038f5fd
commit 6d8a36e061
3 changed files with 9 additions and 4 deletions

View File

@@ -22,9 +22,9 @@ class UIHelper
* @param string $sStateCode Code of the state value
* @param bool $bAllowFallbackIfNoMatch If set to true, a fallback semantic color code will be returned in case of no matching mappping. Otherwise it will return null to indicate there was no match.
*
* @return string|null A semantic status color code (eg. success, pending, failure, neutral, ...) depending on the value's code. Usefull to try to find a semantic match when a class has no style defined on its state attribute.
* @return string|null A semantic status color name (eg. success, pending, failure, neutral, ...) depending on the value's code. Usefull to try to find a semantic match when a class has no style defined on its state attribute.
*/
public static function GetColorFromStatusCode(string $sStateCode, bool $bAllowFallbackIfNoMatch = true): ?string
public static function GetColorNameFromStatusCode(string $sStateCode, bool $bAllowFallbackIfNoMatch = true): ?string
{
$sStatusColor = null;