You are here

public function BotchaRecipebook::getRecipes in BOTCHA Spam Prevention 7.3

Same name and namespace in other branches
  1. 6.3 controller/recipebook/botcha.recipebook.controller.inc \BotchaRecipebook::getRecipes()

@todo BotchaRecipebook getRecipes Description.

Return value

array

1 call to BotchaRecipebook::getRecipes()
BotchaRecipebook::handle in controller/recipebook/botcha.recipebook.controller.inc
Handle form depending on the result of spam check.

File

controller/recipebook/botcha.recipebook.controller.inc, line 167
Controller layer of the BotchaRecipebook objects.

Class

BotchaRecipebook

Code

public function getRecipes() {
  if (!isset($this->recipes)) {
    $rs = BotchaModel::getRecipebooksRecipes(array(
      'mode' => 'recipe',
      'recipebooks' => $this->id,
    ));
    foreach ($rs as $recipe_id) {
      $this
        ->setRecipe($recipe_id);
    }
  }
  return (array) $this->recipes;
}