Panel factory: Remove SetClassColor() method as it has been move directly in the panel in a previous commit

This commit is contained in:
Molkobain
2021-03-23 14:06:52 +01:00
parent 34c12b61cc
commit 7bf1ef355f

View File

@@ -20,8 +20,6 @@
namespace Combodo\iTop\Application\UI\Base\Component\Panel;
use Combodo\iTop\Application\UI\Base\AbstractUIBlockFactory;
use MetaModel;
use ormStyle;
/**
* Class PanelUIBlockFactory
@@ -175,24 +173,4 @@ class PanelUIBlockFactory extends AbstractUIBlockFactory
return $oPanel;
}
/**
* @param string $sClass
* @param \Combodo\iTop\Application\UI\Base\Component\Panel\Panel $oPanel
*
* @throws \CoreException
*/
public static function SetClassColor(string $sClass, Panel $oPanel): void
{
/** @var ormStyle $oStyle */
$sColor = null;
$oStyle = MetaModel::GetClassStyle($sClass);
if ($oStyle) {
$sColor = $oStyle->GetMainColor();
}
if (strlen($sColor) == 0) {
$sColor = Panel::ENUM_COLOR_BLUE;
}
$oPanel->SetColor($sColor);
}
}