protected function _renderMenu(ItemInterface $item, array $options)
    {
        if (!$item->hasChildren() ||
            $options['depth'] === 0 ||
            !$item->getDisplayChildren()
        ) {
            return '';
        }

        $templater = $this->templater();

        $newTemplates =
            (array)$item->getExtra('templates') +
            (array)$options['templates'];
        if ($newTemplates) {
            $templater->push();
            $templater->add($newTemplates);
        }
        $options['defaultTemplates'] = $templater->getConfig();
        unset($options['templates']);

        $templateVars =
            (array)$item->getExtra('templateVars') +
            (array)$options['templateVars'];
        if (empty($templateVars)) {
            $templateVars = null;
        }
        $options['defaultTemplateVars'] = $templateVars;
        unset($options['templateVars']);

        $rendered = (string)$templater->format('menu', [
            'attrs' => $this->_formatAttributes($item->getChildrenAttributes(), $item),
            'templateVars' => $templateVars,
            'items' => $this->_renderChildren($item, $options)
        ]);

        if ($newTemplates) {
            $templater->pop();
        }

        return $rendered;
    }