mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-25 11:38:44 +02:00
N°3123 - Refactor Directories
This commit is contained in:
22
sources/application/UI/Base/Component/Badge/BadgeFactory.php
Normal file
22
sources/application/UI/Base/Component/Badge/BadgeFactory.php
Normal file
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
/**
|
||||
* @copyright Copyright (C) 2010-2020 Combodo SARL
|
||||
* @license http://opensource.org/licenses/AGPL-3.0
|
||||
*/
|
||||
|
||||
|
||||
namespace Combodo\iTop\Application\UI\Base\Component\Badge;
|
||||
|
||||
|
||||
use Combodo\iTop\Application\UI\Helper\UIHelper;
|
||||
|
||||
class BadgeFactory
|
||||
{
|
||||
|
||||
public static function MakeForState(string $sClass, string $sStateCode)
|
||||
{
|
||||
$sColor = UIHelper::GetColorFromStatus($sClass, $sStateCode);
|
||||
return new Badge($sColor);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user