function recipe_rdf_mapping in Recipe 7.2
Same name and namespace in other branches
- 7 recipe.module \recipe_rdf_mapping()
Implements hook_rdf_mapping().
1 call to recipe_rdf_mapping()
- recipe_update_7004 in ./
recipe.install - Update recipe RDF mapping to use the schema.org terms.
File
- ./
recipe.module, line 1365 - Contains functions for Recipe node CRUD and display.
Code
function recipe_rdf_mapping() {
return array(
array(
'type' => 'node',
'bundle' => 'recipe',
'mapping' => array(
'rdftype' => array(
'schema:Recipe',
),
'title' => array(
'predicates' => array(
'schema:name',
),
),
'recipe_instructions' => array(
'predicates' => array(
'schema:instructions',
),
),
'recipe_description' => array(
'predicates' => array(
'schema:summary',
),
),
'recipe_prep_time' => array(
'predicates' => array(
'schema:prepTime',
),
'datatype' => 'xsd:duration',
'callback' => 'recipe_duration_iso8601',
),
'recipe_cook_time' => array(
'predicates' => array(
'schema:cookTime',
),
'datatype' => 'xsd:duration',
'callback' => 'recipe_duration_iso8601',
),
'recipe_totaltime' => array(
'predicates' => array(
'schema:totalTime',
),
),
'recipe_yield' => array(
'predicates' => array(
'schema:yield',
),
),
'recipe_ingredient' => array(
'predicates' => array(
'schema:ingredients',
),
),
),
),
);
}