Habari\FormControlCheckbox::get PHP Method

get() public method

Produce the control for display
public get ( Theme $theme ) : string
$theme Theme The theme that will be used to render the template
return string The output of the template
    public function get(Theme $theme)
    {
        // Because this is a checkbox, the value isn't directly output in the control
        $this->properties['value'] = $this->returned_value;
        if ($this->value == false) {
            unset($this->properties['checked']);
        } else {
            $this->properties['checked'] = 'checked';
        }
        return parent::get($theme);
    }