/** * {@inheritdoc} */ public function render() { $title = $this->getTitle(); if (sizeof($this->ul->getElements()) == 0) { $this->ul->setRenderable(false); } else { $this->setTitle($title . ' <span class="caret"></span>'); } $return = $this->container->render(); $this->setTitle($title); return $return; }