src/Renderer/StringTemplateRenderer.php
protected function _renderChildren(ItemInterface $item, array $options)
    {
        if ($options['depth'] !== null) {
            $options['depth'] = $options['depth'] - 1;
        }

        if ($options['matchingDepth'] !== null &&
            $options['matchingDepth'] > 0
        ) {
            $options['matchingDepth'] = $options['matchingDepth'] - 1;
        }

        $children = [];
        foreach ($item->getChildren() as $child) {
            $children[] = $this->_renderItem($child, $options);
        }

        return $children;
    }
protected function _renderChildren(ItemInterface $item, array $options)
    {
        if ($options['depth'] !== null) {
            $options['depth'] = $options['depth'] - 1;
        }

        if ($options['matchingDepth'] !== null &&
            $options['matchingDepth'] > 0
        ) {
            $options['matchingDepth'] = $options['matchingDepth'] - 1;
        }

        $children = [];
        foreach ($item->getChildren() as $child) {
            $children[] = $this->_renderItem($child, $options);
        }

        return $children;
    }
protected function _renderChildren ( ItemInterface $ item , array $ options ) { if ( $ options [ 'depth' ] !== null ) { $ options [ 'depth' ] = $ options [ 'depth' ] - 1 ; } if ( $ options [ 'matchingDepth' ] !== null && $ options [ 'matchingDepth' ] > 0 ) { $ options [ 'matchingDepth' ] = $ options [ 'matchingDepth' ] - 1 ; } $ children = [ ] ; foreach ( $ item -> getChildren ( ) as $ child ) { $ children [ ] = $ this -> _renderItem ( $ child , $ options ) ; } return $ children ; }
Renders the menu items children.

@param ItemInterface $item The item whose children to render.
@param array $options The rendering options.
@return string[] The rendered children.
Renders the menu items children .