isProtected()) { $value = $this->protected; $disable = ' disabled="disabled"'; } else { $value = is_null($this->local) ? $this->default : $this->local; } $key = htmlspecialchars($this->key); $checked = ($value) ? ' checked="checked"' : ''; $label = ''; $input = '
'; return [$label, $input]; } /** @inheritdoc */ public function update($input) { if ($this->isProtected()) return false; $input = ($input) ? 1 : 0; $value = is_null($this->local) ? $this->default : $this->local; if ($value == $input) return false; $this->local = $input; return true; } }