GetStyleClass(); $sPrimaryColor = $oStyle->GetMainColor(); $sComplementaryColor = $oStyle->GetComplementaryColor(); if (!is_null($sPrimaryColor) && !is_null($sComplementaryColor)) { $oBadge = new FieldBadge(null, $sStyleClass.' ibo-field-badge'); $sDecorationClasses = $oStyle->GetDecorationClasses(); if (!is_null($sDecorationClasses)) { $oBadge->AddHtml(" "); } $oBadge->AddHtml("$sValue"); // Add custom style // TODO 3.0 To be removed when compilation supports generated CSS $oBadge->AddHtml(<< .$sStyleClass { color: $sComplementaryColor; background-color: $sPrimaryColor; } HTML ); } } if (!$oBadge) { $oBadge = new FieldBadge(); $oBadge->AddHtml("$sValue"); } return $oBadge; } }