You are here

public function BotchaRecipeController::getRecipe in BOTCHA Spam Prevention 7.3

Same name and namespace in other branches
  1. 6.3 controller/recipe/botcha.recipe.controller.inc \BotchaRecipeController::getRecipe()

Overrides IBotchaRecipeController::getRecipe

1 call to BotchaRecipeController::getRecipe()
BotchaRecipeController::save in controller/recipe/botcha.recipe.controller.inc

File

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

Class

BotchaRecipeController

Code

public function getRecipe($id, $create = TRUE) {

  // @todo Respect $create parameter.
  // @see?
  $r = $this
    ->getModel()
    ->getRecipe($id);
  $classname = $r->classname;
  $recipe = new $classname($id);
  $recipe
    ->setTitle($r->title)
    ->setDescription($r->description);
  return $recipe;
}