protected function renderChildTag($tagName, $attributes = [], $forceClosingTag = false, $mode = 'none')
{
$tagBuilder = clone $this->tag;
$tagBuilder->reset();
$tagBuilder->setTagName($tagName);
$tagBuilder->addAttributes($attributes);
$tagBuilder->forceClosingTag($forceClosingTag);
$childTag = $tagBuilder->render();
if ('append' === $mode || 'prepend' === $mode) {
$content = $this->tag->getContent();
if ('append' === $mode) {
$content = $content . $childTag;
} else {
$content = $childTag . $content;
}
$this->tag->setContent($content);
}
return $childTag;
}