| Conditions | 2 |
| Paths | 2 |
| Total Lines | 17 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 7 | public function __construct($checkName, $childField, $value = "", $readonly = false) |
||
| 8 | { |
||
| 9 | $this->name = $checkName; |
||
| 10 | $this->checkbox = new CheckboxField($checkName, "", $value); |
||
| 11 | if ($readonly) { |
||
| 12 | $this->checkbox->setDisabled(true); |
||
| 13 | } |
||
| 14 | |||
| 15 | $this->childField = $childField; |
||
| 16 | |||
| 17 | $children = new FieldList( |
||
| 18 | $this->childField, |
||
| 19 | $this->checkbox |
||
| 20 | ); |
||
| 21 | |||
| 22 | parent::__construct($children); |
||
| 23 | } |
||
| 24 | |||
| 50 |