mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-26 12:08:47 +02:00
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:
31
sources/application/UI/Base/Component/Pill/PillFactory.php
Normal file
31
sources/application/UI/Base/Component/Pill/PillFactory.php
Normal 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);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user