chg: [helper:bootstrap] Added support of ID option

refacto/CRUDComponent
Sami Mokaddem 2023-02-24 10:04:18 +01:00
parent 6eb5106153
commit 73c4baac31
No known key found for this signature in database
GPG Key ID: 164C473F627A06FA
1 changed files with 2 additions and 0 deletions

View File

@ -21,6 +21,7 @@ class BootstrapIcon extends BootstrapGeneric
{ {
private $icon = ''; private $icon = '';
private $defaultOptions = [ private $defaultOptions = [
'id' => '',
'class' => [], 'class' => [],
'title' => '', 'title' => '',
'attrs' => [], 'attrs' => [],
@ -48,6 +49,7 @@ class BootstrapIcon extends BootstrapGeneric
{ {
$html = $this->node('span', array_merge( $html = $this->node('span', array_merge(
[ [
'id' => $this->options['id'] ?? '',
'class' => array_merge( 'class' => array_merge(
$this->options['class'], $this->options['class'],
["fa fa-{$this->icon}"] ["fa fa-{$this->icon}"]