You are here

protected function BotchaRecipebookAbstract::applyForBuildId in BOTCHA Spam Prevention 6.2

Same name and namespace in other branches
  1. 7.2 controller/botcha_recipebook.controller.inc \BotchaRecipebookAbstract::applyForBuildId()
1 call to BotchaRecipebookAbstract::applyForBuildId()
BotchaRecipebookAbstract::apply in controller/botcha_recipebook.controller.inc

File

controller/botcha_recipebook.controller.inc, line 421
Controller layer of the BotchaRecipebook objects.

Class

BotchaRecipebookAbstract
@file Controller layer of the BotchaRecipebook objects.

Code

protected function applyForBuildId(&$form, &$form_state, $method, $build_id) {
  $secret = $this
    ->getRecipeSecret($build_id);

  // We are going to store any changes of the recipes states.
  $recipes = $this
    ->getRecipes();
  foreach ($recipes as $recipe) {

    // Set necessary parameters.
    $recipe
      ->setSecret($secret)
      ->setMethod($method);

    // Apply recipe to the concrete form.
    $recipe
      ->applyRecipe($form, $form_state);
  }
}