protected function doRenderTags($contentType): void
    {
        if (isset($this->contents[$contentType])) {
            $tags = $this->contents[$contentType];
            /** @var TagRendererInterface[] $renderers */
            $renderers = [];
            $rendererTags = [];

            foreach ($tags as $tag) {
                $renderer = $this->findRenderer($tag);
                $id = spl_object_hash($renderer);
                $renderers[$id] = $renderer;
                $rendererTags[$id][] = $tag;
            }

            foreach ($renderers as $id => $renderer) {
                foreach ($renderer->order($rendererTags[$id]) as $orderedTag) {
                    echo $this->renderTag($renderer, $orderedTag);
                }
            }
            unset($this->contents[$contentType]);
        }
    }
protected function doRenderTags($contentType): void
    {
        if (isset($this->contents[$contentType])) {
            $tags = $this->contents[$contentType];
            /** @var TagRendererInterface[] $renderers */
            $renderers = [];
            $rendererTags = [];

            foreach ($tags as $tag) {
                $renderer = $this->findRenderer($tag);
                $id = spl_object_hash($renderer);
                $renderers[$id] = $renderer;
                $rendererTags[$id][] = $tag;
            }

            foreach ($renderers as $id => $renderer) {
                foreach ($renderer->order($rendererTags[$id]) as $orderedTag) {
                    echo $this->renderTag($renderer, $orderedTag);
                }
            }
            unset($this->contents[$contentType]);
        }
    }
protected function doRenderTags ( $ contentType ) : void { if ( isset ( $ this -> contents [ $ contentType ] ) ) { $ tags = $ this -> contents [ $ contentType ] ; /** @var TagRendererInterface[] $renderers */ $ renderers = [ ] ; $ rendererTags = [ ] ; foreach ( $ tags as $ tag ) { $ renderer = $ this -> findRenderer ( $ tag ) ; $ id = spl_object_hash ( $ renderer ) ; $ renderers [ $ id ] = $ renderer ; $ rendererTags [ $ id ] [ ] = $ tag ; } foreach ( $ renderers as $ id => $ renderer ) { foreach ( $ renderer -> order ( $ rendererTags [ $ id ] ) as $ orderedTag ) { echo $ this -> renderTag ( $ renderer , $ orderedTag ) ; } } unset ( $ this -> contents [ $ contentType ] ) ; } }
Do render the tags by type.

@param string $contentType The content type

@throws RequireTagException
@throws RuntimeTagRendererException
Do render the tags by type .