chg: [helper:boostrap-helper] Added support of badge inside button

pull/40/head
mokaddem 2021-03-10 09:32:00 +01:00
parent b55c1b813f
commit 474cd6c9eb
1 changed files with 6 additions and 1 deletions

View File

@ -583,7 +583,8 @@ class BoostrapButton extends BootstrapGeneric {
'class' => [],
'type' => 'button',
'nodeType' => 'button',
'params' => []
'params' => [],
'badge' => false
];
private $bsClasses = [];
@ -635,6 +636,10 @@ class BoostrapButton extends BootstrapGeneric {
$html .= $this->genIcon();
$html .= $this->genContent();
if (!empty($this->options['badge'])) {
$bsBadge = new BoostrapBadge($this->options['badge']);
$html .= $bsBadge->badge();
}
$html .= $this->closeNode($this->options['nodeType']);
return $html;
}