You are here

public static function BotchaRecipeModel::getRecipes in BOTCHA Spam Prevention 6.2

Same name and namespace in other branches
  1. 6.3 model/recipe/botcha.recipe.model.inc \BotchaRecipeModel::getRecipes()
  2. 7.2 model/botcha_recipe.model.inc \BotchaRecipeModel::getRecipes()
  3. 7.3 model/recipe/botcha.recipe.model.inc \BotchaRecipeModel::getRecipes()
2 calls to BotchaRecipeModel::getRecipes()
Botcha::getRecipes in controller/botcha.controller.inc
Get a list of all BOTCHA recipes objects.
BotchaRecipeModel::getRecipe in model/botcha_recipe.model.inc

File

model/botcha_recipe.model.inc, line 14
Contains BotchaRecipeModel class.

Class

BotchaRecipeModel
@file Contains BotchaRecipeModel class.

Code

public static function getRecipes($parameters = array()) {

  // Parameters to pass to the build query mechanism.
  $pars = array();
  $pars['fields'] = array();
  if (!empty($parameters['recipes'])) {
    $pars['conditions'][BOTCHA_MODEL_OP_IN]['id'] = (array) $parameters['recipes'];
  }

  // Execute query and fetch the result.
  $query = BotchaModel::buildQuery(BOTCHA_MODEL_TYPE_SELECT, 'botcha_recipe', $pars);
  $result_query = BotchaModel::getQueryResult($query['query'], $query['query_subs']);
  $result = BotchaModel::fetchQueryResult($result_query);
  return $result;
}