yii\i18n\Formatter::asHtml PHP 메소드

asHtml() 공개 메소드

The value will be purified using [[HtmlPurifier]] to avoid XSS attacks. Use Formatter::asRaw if you do not want any purification of the value.
public asHtml ( string $value, array | null $config = null ) : string
$value string the value to be formatted.
$config array | null the configuration for the HTMLPurifier class.
리턴 string the formatted result.
    public function asHtml($value, $config = null)
    {
        if ($value === null) {
            return $this->nullDisplay;
        }
        return HtmlPurifier::process($value, $config);
    }