kartik\helpers\Html::getPanelTitle PHP Method

getPanelTitle() protected static method

Generates panel title for heading and footer.
protected static getPanelTitle ( array $content, string $type ) : string
$content array the panel content settings.
$type string whether `heading` or `footer`
return string
    protected static function getPanelTitle($content, $type)
    {
        $title = ArrayHelper::getValue($content, $type, '');
        if (!Enum::isEmpty($title)) {
            if (ArrayHelper::getValue($content, "{$type}Title", true) === true) {
                $title = static::tag("h3", $title, ["class" => "panel-title"]);
            }
            return static::tag("div", $title, ["class" => "panel-{$type}"]) . "\n";
        } else {
            return '';
        }
    }