Stolz\Assets\Manager::buildTagAttributes PHP Метод

buildTagAttributes() публичный Метод

Build an HTML attribute string from an array.
public buildTagAttributes ( array $attributes ) : string
$attributes array
Результат string
    public function buildTagAttributes(array $attributes)
    {
        $html = array();
        foreach ($attributes as $key => $value) {
            if (is_null($value)) {
                continue;
            }
            if (is_numeric($key)) {
                $key = $value;
            }
            $html[] = $key . '="' . htmlentities($value, ENT_QUOTES, 'UTF-8', false) . '"';
        }
        return count($html) > 0 ? ' ' . implode(' ', $html) : '';
    }