src/Renderer/StringTemplateRenderer.php
protected function _formatAttributes(array $attributes, ItemInterface $item)
    {
        if (!empty($attributes)) {
            return $this->templater()->formatAttributes(
                $attributes + ['escape' => $item->getExtra('escape', true)]
            );
        }

        return '';
    }
protected function _formatAttributes(array $attributes, ItemInterface $item)
    {
        if (!empty($attributes)) {
            return $this->templater()->formatAttributes(
                $attributes + ['escape' => $item->getExtra('escape', true)]
            );
        }

        return '';
    }
protected function _formatAttributes ( array $ attributes , ItemInterface $ item ) { if ( ! empty ( $ attributes ) ) { return $ this -> templater ( ) -> formatAttributes ( $ attributes + [ 'escape' => $ item -> getExtra ( 'escape' , true ) ] ) ; } return '' ; }
Formats an array of attributes as a string of HTML attributes.

@param array $attributes The attributes to format.
@param ItemInterface $item The menu item that defined the attributes.
@return string A formatted string of HTML attributes.
Formats an array of attributes as a string of HTML attributes .