function BotchaRecipeObscureUrl::generateFormElements in BOTCHA Spam Prevention 7.2
Same name and namespace in other branches
- 6.2 controller/botcha_recipe.controller.inc \BotchaRecipeObscureUrl::generateFormElements()
- 6.3 controller/recipe/botcha.recipe.controller.inc \BotchaRecipeObscureUrl::generateFormElements()
- 7.3 controller/recipe/botcha.recipe.controller.inc \BotchaRecipeObscureUrl::generateFormElements()
Used to get information about the recipe. Must be overridden with calling to parent::generateFormElements. @todo BotchaRecipe generateFormElements Switch from indexed array to associative.
Overrides BotchaRecipeUsingJsAbstract::generateFormElements
File
- controller/
botcha_recipe.controller.inc, line 819 - Controller layer of the BotchaRecipe objects.
Class
Code
function generateFormElements() {
$fields = $this
->getProperty($this->settings['fields'], 'getFields');
return array_merge(parent::generateFormElements(), array(
// Add hidden field to keep part of the token.
$fields[1]['name'] => array(
'#type' => 'hidden',
// Store part of secure_token.
'#default_value' => $fields[1]['default_value'],
'#attributes' => array(
'class' => array(
$fields[1]['class'],
),
),
'#weight' => 20,
),
));
}