protected function getCheckboxCheckedState($name, $value, $checked)
    {
        $posted = $this->getValueAttribute($name, $checked);

        if (is_array($posted)) {
            return in_array($value, $posted);
        } else {
            return (bool)$posted;
        }
    }