igaster\laravelTheme\Themes::HtmlAttributes PHP Метод

HtmlAttributes() приватный Метод

Return attributes in html format
private HtmlAttributes ( array $attributes ) : string
$attributes array
Результат string
    private function HtmlAttributes($attributes)
    {
        $formatted = join(' ', array_map(function ($key) use($attributes) {
            if (is_bool($attributes[$key])) {
                return $attributes[$key] ? $key : '';
            }
            return $key . '="' . $attributes[$key] . '"';
        }, array_keys($attributes)));
        return $formatted;
    }