Menu/Helper.php
public function addDivider(ItemInterface $item, $vertical = false)
    {
        $class = $vertical ? 'divider-vertical' : 'divider';

        return $item->addChild('divider_' . \rand())
            ->setLabel('')
            ->setAttribute('class', $class);
    }
public function addDivider(ItemInterface $item, $vertical = false)
    {
        $class = $vertical ? 'divider-vertical' : 'divider';

        return $item->addChild('divider_' . \rand())
            ->setLabel('')
            ->setAttribute('class', $class);
    }
Adds a vertical/horizontal divider.

@param ItemInterface $item
@param bool          $vertical

@return ItemInterface