You are here

protected function BotchaRecipeUsingJsAbstract::getJsMatch in BOTCHA Spam Prevention 7.3

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

What JS matches in the field.

File

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

Class

BotchaRecipeUsingJsAbstract

Code

protected function getJsMatch() {
  $chop_positions = array_keys($this
    ->getProperty($this->settings['js']['chops'], 'getJsChops'));
  return substr($this
    ->getFieldDefault(0), 0, $this
    ->getJsPos() + mt_rand(2, $chop_positions[1]));
}