componentFactory->createDropDownItem() * ->setTag('a') * ->setHref('#') * ->setLabel('Label') * ->setTitle('Title') * ->setIcon($this->iconFactory->getIcon('actions-heart')) * ->setAttributes(['data-value' => '123']); * $dropDownButton->addItem($item); * ``` */ class DropDownItem extends AbstractDropDownItem implements DropDownItemInterface { public function render(): string { return sprintf( '<%1$s %2$s>%3$s%4$s', $this->getTag(), $this->getAttributesString(), $this->getIcon()?->render() ?? '', htmlspecialchars($this->getLabel()) ); } }