src/Template/AbstractTemplate.php
public function attr($keys = [])
    {
        if (!is_array($keys)) {
            $keys = [$keys];
        }
        
        $out = '';
        foreach ($keys as $key) {
            $value = $this->getValue($key)->attr();
            if (!empty($value)) {
                $out .= ' ' . $value;
            }
        }
        return ltrim($out, ' ');
    }
public function attr($keys = [])
    {
        if (!is_array($keys)) {
            $keys = [$keys];
        }
        
        $out = '';
        foreach ($keys as $key) {
            $value = $this->getValue($key)->attr();
            if (!empty($value)) {
                $out .= ' ' . $value;
            }
        }
        return ltrim($out, ' ');
    }
Renders the all the given keys as HTML element attributes.

@param array|string $keys
@return string