function recipe_load in Recipe 7
Same name and namespace in other branches
- 5 recipe.module \recipe_load()
- 6 recipe.module \recipe_load()
- 7.2 recipe.module \recipe_load()
Implements hook_load().
File
- ./
recipe.module, line 85 - Contains functions for Recipe node CRUD and display.
Code
function recipe_load($nodes) {
$result = db_query('SELECT * FROM {recipe} WHERE nid IN (:nids)', array(
':nids' => array_keys($nodes),
));
foreach ($result as $record) {
$nodes[$record->nid]->recipe_source = $record->source;
$nodes[$record->nid]->recipe_yield = $record->yield;
$nodes[$record->nid]->recipe_yield_unit = $record->yield_unit;
$nodes[$record->nid]->recipe_description = $record->description;
$nodes[$record->nid]->recipe_instructions = $record->instructions;
$nodes[$record->nid]->recipe_notes = $record->notes;
$nodes[$record->nid]->recipe_preptime = $record->preptime;
$nodes[$record->nid]->recipe_cooktime = $record->cooktime;
$nodes[$record->nid]->recipe_ingredients['ing'] = recipe_load_ingredients($record->nid);
}
}