GetStyleClass(); $sPrimaryColor = $oStyle->GetMainColor(); $oBadge = new FieldBadge(null, $sStyleClass.' ibo-field-badge'); $sComplementaryColor = $oStyle->GetComplementaryColor(); $sDecorationClasses = $oStyle->GetDecorationClasses(); if ($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 ); } else { $oBadge = new FieldBadge(); $oBadge->AddHtml("$sValue"); } return $oBadge; } }