Menu/Helper.php
public function addHeader(ItemInterface $item, $text)
    {
        return $item->addChild('header_' . \rand())
            ->setLabel($text)
            ->setAttribute('class', 'nav-header');
    }
public function addHeader(ItemInterface $item, $text)
    {
        return $item->addChild('header_' . \rand())
            ->setLabel($text)
            ->setAttribute('class', 'nav-header');
    }
Adds a menu header.

@param ItemInterface $item
@param $text

@return ItemInterface