src/Knp/Menu/Renderer/Renderer.php
private function htmlAttributesCallback($name, $value)
    {
        if (false === $value || null === $value) {
            return '';
        }

        return ' '.$this->renderHtmlAttribute($name, $value);
    }
private function htmlAttributesCallback($name, $value)
    {
        if (false === $value || null === $value) {
            return '';
        }

        return ' '.$this->renderHtmlAttribute($name, $value);
    }
Prepares an attribute key and value for HTML representation.

It removes empty attributes.

@param string $name  The attribute name
@param string $value The attribute value

@return string The HTML representation of the HTML key attribute pair.