Habari\FormControlCheckboxes::get PHP Method

get() public method

public get ( Theme $theme )
$theme Theme
    public function get(Theme $theme)
    {
        $checkboxes = $this->options;
        $control = $this;
        if (!is_array($control->value)) {
            $control->value = array();
        }
        array_walk($checkboxes, function (&$item, $key) use($control) {
            $item = array('label' => Utils::htmlspecialchars($item), 'id' => Utils::slugify($control->get_id() . '-' . $key), 'checked' => in_array($key, $control->value) ? 'checked="checked"' : '');
        });
        $this->vars['checkboxes'] = $checkboxes;
        $this->settings['ignore_name'] = true;
        return parent::get($theme);
    }
FormControlCheckboxes