Back to ColorStyle class

Method getStyle

public string
getStyle
()
Get the translated color code.
Returns
  • string
Since
  • 4.0.0
Class: ColorStyle
Project: Joomla

Method getStyle - Source code

/**
 * Get the translated color code.
 *
 * @return  string
 *
 * @since   4.0.0
 */
public function getStyle() : string
{
    $values = [];
    if ($this->fgColor) {
        $values[] = $this->fgColor;
    }
    if ($this->bgColor) {
        $values[] = $this->bgColor;
    }
    foreach ($this->options as $option) {
        $values[] = static::$knownOptions[$option];
    }
    return implode(';', $values);
}