* @package Combodo\iTop\Application\UI\Component\Panel * @since 2.8.0 */ class PanelFactory { /** * Make a basis Panel component * * @param string $sTitle * * @return \Combodo\iTop\Application\UI\Component\Panel\Panel */ public static function MakeNeutral(string $sTitle) { $oPanel = new Panel($sTitle); $oPanel->SetColor(Panel::ENUM_COLOR_NEUTRAL); return $oPanel; } /** * Make a Panel component for informational messages * * @param string $sTitle * * @return \Combodo\iTop\Application\UI\Component\Panel\Panel */ public static function MakeForInformation(string $sTitle) { $oPanel = new Panel($sTitle); $oPanel->SetColor(Panel::ENUM_COLOR_INFORMATION); return $oPanel; } /** * Make a Panel component for successful messages * * @param string $sTitle * * @return \Combodo\iTop\Application\UI\Component\Panel\Panel */ public static function MakeForSuccess(string $sTitle) { $oPanel = new Panel($sTitle); $oPanel->SetColor(Panel::ENUM_COLOR_SUCCESS); return $oPanel; } /** * Make a Panel component for warning messages * * @param string $sTitle * * @return \Combodo\iTop\Application\UI\Component\Panel\Panel */ public static function MakeForWarning(string $sTitle) { $oPanel = new Panel($sTitle); $oPanel->SetColor(Panel::ENUM_COLOR_WARNING); return $oPanel; } /** * Make a Panel component for danger messages * * @param string $sTitle * * @return \Combodo\iTop\Application\UI\Component\Panel\Panel */ public static function MakeForDanger(string $sTitle) { $oPanel = new Panel($sTitle); $oPanel->SetColor(Panel::ENUM_COLOR_DANGER); return $oPanel; } /** * Make a Panel component for failure messages * * @param string $sTitle * * @return \Combodo\iTop\Application\UI\Component\Panel\Panel */ public static function MakeForFailure(string $sTitle) { $oPanel = new Panel($sTitle); $oPanel->SetColor(Panel::ENUM_COLOR_FAILURE); return $oPanel; } /** * Make a Panel component with primary color scheme * * @param string $sTitle * * @return \Combodo\iTop\Application\UI\Component\Panel\Panel */ public static function MakeWithBrandingPrimaryColor(string $sTitle) { $oPanel = new Panel($sTitle); $oPanel->SetColor(Panel::ENUM_COLOR_PRIMARY); return $oPanel; } /** * Make a Panel component with secondary color scheme * * @param string $sTitle * * @return \Combodo\iTop\Application\UI\Component\Panel\Panel */ public static function MakeWithBrandingSecondaryColor(string $sTitle) { $oPanel = new Panel($sTitle); $oPanel->SetColor(Panel::ENUM_COLOR_SECONDARY); return $oPanel; } }