chg: [helper:boostrap-helper] Added support of badge inside button
parent
b55c1b813f
commit
474cd6c9eb
|
@ -583,7 +583,8 @@ class BoostrapButton extends BootstrapGeneric {
|
||||||
'class' => [],
|
'class' => [],
|
||||||
'type' => 'button',
|
'type' => 'button',
|
||||||
'nodeType' => 'button',
|
'nodeType' => 'button',
|
||||||
'params' => []
|
'params' => [],
|
||||||
|
'badge' => false
|
||||||
];
|
];
|
||||||
|
|
||||||
private $bsClasses = [];
|
private $bsClasses = [];
|
||||||
|
@ -635,6 +636,10 @@ class BoostrapButton extends BootstrapGeneric {
|
||||||
|
|
||||||
$html .= $this->genIcon();
|
$html .= $this->genIcon();
|
||||||
$html .= $this->genContent();
|
$html .= $this->genContent();
|
||||||
|
if (!empty($this->options['badge'])) {
|
||||||
|
$bsBadge = new BoostrapBadge($this->options['badge']);
|
||||||
|
$html .= $bsBadge->badge();
|
||||||
|
}
|
||||||
$html .= $this->closeNode($this->options['nodeType']);
|
$html .= $this->closeNode($this->options['nodeType']);
|
||||||
return $html;
|
return $html;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue