src/View/Helper/HtmlElementTrait.php
protected function getHtmlAttribValue($key, $value)
    {
        if (('on' == substr($key, 0, 2)) || ('constraints' == $key)) {
            // Don't escape event attributes; _do_ substitute double quotes with singles
            if (!is_scalar($value)) {
                // Non-scalar data should be cast to JSON first
                return Json::encode($value);
            }
            return $value;
        }
        
        if (is_array($value)) {
            return implode(' ', $value);
        }
        
        return $value;
    }
protected function getHtmlAttribValue($key, $value)
    {
        if (('on' == substr($key, 0, 2)) || ('constraints' == $key)) {
            // Don't escape event attributes; _do_ substitute double quotes with singles
            if (!is_scalar($value)) {
                // Non-scalar data should be cast to JSON first
                return Json::encode($value);
            }
            return $value;
        }
        
        if (is_array($value)) {
            return implode(' ', $value);
        }
        
        return $value;
    }
protected function getHtmlAttribValue ( $ key , $ value ) { if ( ( 'on' == substr ( $ key , 0 , 2 ) ) || ( 'constraints' == $ key ) ) { // Don't escape event attributes; _do_ substitute double quotes with singles if ( ! is_scalar ( $ value ) ) { // Non-scalar data should be cast to JSON first return Json :: encode ( $ value ) ; } return $ value ; } if ( is_array ( $ value ) ) { return implode ( ' ' , $ value ) ; } return $ value ; }
Get html attribute value

@param  string $key
@param  string $value
@return string
@SuppressWarnings(PHPMD.StaticAccess)
Get html attribute value