/** * {@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; }
/** * @param string $content * @param string $type * @param string $size */ public function __construct(string $content, string $type = self::TYPE_DEFAULT, string $size = null) { $this->tag = '<a>'; $this->addAttribute('role', 'button'); parent::__construct($content, $type, $size); }