You are here

public function BotchaRecipe::handle in BOTCHA Spam Prevention 7.3

Same name and namespace in other branches
  1. 6.2 controller/botcha_recipe.controller.inc \BotchaRecipe::handle()
  2. 6.3 controller/recipe/botcha.recipe.controller.inc \BotchaRecipe::handle()
  3. 7.2 controller/botcha_recipe.controller.inc \BotchaRecipe::handle()

Handle form depending on the result of spam check.

_state

Parameters

string $result:

array $form:

1 call to BotchaRecipe::handle()
BotchaRecipeNoResubmit::handle in controller/recipe/botcha.recipe.controller.inc
Handle form depending on the result of spam check.
1 method overrides BotchaRecipe::handle()
BotchaRecipeNoResubmit::handle in controller/recipe/botcha.recipe.controller.inc
Handle form depending on the result of spam check.

File

controller/recipe/botcha.recipe.controller.inc, line 285
Controller layer of the BotchaRecipe objects.

Class

BotchaRecipe
Abstract class to describe recipe data structure.

Code

public function handle($result, $form, $form_state) {
  $this
    ->prepare($form, $form_state);
  switch ($result) {
    case 'success':
      break;
    case 'spam':
    default:
      form_set_error($this->error_field, $this->error_text);
      break;
  }
}