function recipe_import_element_start in Recipe 6
Same name and namespace in other branches
- 7.2 modules/recipe_recipeML.module \recipe_import_element_start()
- 7 includes/recipe_recipeML.module \recipe_import_element_start()
Call-back function used by the XML parser.
1 string reference to 'recipe_import_element_start'
File
- plugins/
recipe_recipeML.module, line 236 - recipe_recipeML.module - Enables importing and exporting of recipeML format recipes.
Code
function recipe_import_element_start($parser, $name, $attributes) {
global $recipe, $yield, $ingredient, $preptime;
switch ($name) {
case 'RECIPE':
$recipe = new stdClass();
$recipe->type = "recipe";
// Let's allow comments by default.
$recipe->comment = 2;
$recipe->_categories = array();
break;
case 'ING':
$ingredient = array();
break;
case 'YIELD':
$yield = TRUE;
break;
case 'PREPTIME':
$preptime = TRUE;
break;
}
}