Skip to content

Commit bc69246

Browse files
committed
Checkbox: added getContainerPrototype()
1 parent 592148e commit bc69246

File tree

1 file changed

+14
-5
lines changed

1 file changed

+14
-5
lines changed

src/Forms/Controls/Checkbox.php

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
class Checkbox extends BaseControl
2020
{
2121
/** @var Html wrapper element template */
22-
private $wrapper;
22+
private $container;
2323

2424

2525
/**
@@ -29,7 +29,7 @@ public function __construct($label = null)
2929
{
3030
parent::__construct($label);
3131
$this->control->type = 'checkbox';
32-
$this->wrapper = Html::el();
32+
$this->container = Html::el();
3333
$this->setOption('type', 'checkbox');
3434
}
3535

@@ -57,7 +57,7 @@ public function isFilled(): bool
5757

5858
public function getControl(): Html
5959
{
60-
return $this->wrapper->setHtml($this->getLabelPart()->insert(0, $this->getControlPart()));
60+
return $this->container->setHtml($this->getLabelPart()->insert(0, $this->getControlPart()));
6161
}
6262

6363

@@ -83,10 +83,19 @@ public function getLabelPart(): Html
8383

8484

8585
/**
86-
* Returns wrapper HTML element template.
86+
* Returns container HTML element template.
87+
*/
88+
public function getContainerPrototype(): Html
89+
{
90+
return $this->container;
91+
}
92+
93+
94+
/**
95+
* Returns container HTML element template.
8796
*/
8897
public function getSeparatorPrototype(): Html
8998
{
90-
return $this->wrapper;
99+
return $this->container;
91100
}
92101
}

0 commit comments

Comments
 (0)