protected function renderTree()
    {
        $lines = [];

        $tag = ArrayHelper::remove($this->options, 'tag', 'div');
        $lines[] = Html::beginTag($tag, $this->options);

        $lines[] = $this->renderToolbar();
        $lines[] = $this->renderNodes($this->nodes);

        $lines[] = Html::endTag($tag);

        return implode("\n", $lines);
    }