Contao\CheckBoxWizard::generateCheckbox PHP Method

generateCheckbox() protected method

Generate a checkbox and return it as string
protected generateCheckbox ( array $arrOption, integer $i, string $strButtons ) : string
$arrOption array
$i integer
$strButtons string
return string
    protected function generateCheckbox($arrOption, $i, $strButtons)
    {
        return sprintf('<span><input type="checkbox" name="%s" id="opt_%s" class="tl_checkbox" value="%s"%s%s onfocus="Backend.getScrollOffset()"> %s<label for="opt_%s">%s</label></span>', $this->strName . ($this->multiple ? '[]' : ''), $this->strId . '_' . $i, $this->multiple ? \StringUtil::specialchars($arrOption['value']) : 1, is_array($this->varValue) && in_array($arrOption['value'], $this->varValue) || $this->varValue == $arrOption['value'] ? ' checked="checked"' : '', $this->getAttributes(), $strButtons, $this->strId . '_' . $i, $arrOption['label']);
    }