N°3581 - Dashlet: Rename Badge block to Pill as it can contain just a simple text and to avoid confusion with the DashletBadge

This commit is contained in:
Molkobain
2021-03-17 18:36:16 +01:00
parent 8ce2e43780
commit ca2c66733c
9 changed files with 143 additions and 116 deletions

View File

@@ -0,0 +1,31 @@
<?php
/**
* @copyright Copyright (C) 2010-2021 Combodo SARL
* @license http://opensource.org/licenses/AGPL-3.0
*/
namespace Combodo\iTop\Application\UI\Base\Component\Pill;
use Combodo\iTop\Application\UI\Helper\UIHelper;
/**
* Class PillFactory
*
* @internal
* @author Eric Espie <eric.espie@combodo.com>
* @since 3.0.0
* @package Combodo\iTop\Application\UI\Base\Component\Pill
*/
class PillFactory
{
public static function MakeForState(string $sClass, string $sStateCode)
{
$sColor = UIHelper::GetColorFromStatus($sClass, $sStateCode);
return new Pill($sColor);
}
}