public function BotchaForm::setEnabled in BOTCHA Spam Prevention 7.3
Same name and namespace in other branches
- 6.3 controller/form/botcha.form.controller.inc \BotchaForm::setEnabled()
File
- controller/
form/ botcha.form.controller.inc, line 132 - Controller layer of the BotchaForm objects.
Class
Code
public function setEnabled($enabled) {
$form_id = $this->id;
// Cast to boolean first.
$enabled = (bool) $enabled;
// Cast to integer.
$enabled = (int) $enabled;
variable_set("botcha_enabled_{$form_id}", $enabled);
return $this;
}