You are here

function recipe_recipeML_recipeio in Recipe 7

Same name and namespace in other branches
  1. 6 plugins/recipe_recipeML.module \recipe_recipeML_recipeio()
  2. 7.2 modules/recipe_recipeML.module \recipe_recipeML_recipeio()

Implementation of hook_recipeio($type).

File

includes/recipe_recipeML.module, line 11
recipe_recipeML.module - Enables importing and exporting of recipeML format recipes.

Code

function recipe_recipeML_recipeio($type) {
  $supported = array(
    'export_single' => array(
      'format_name' => t('recipeML'),
      'callback' => 'recipe_recipeML_export_single',
      'format_help' => t('Export to a recipeML based xml format.'),
    ),
    'export_multi' => array(
      'format_name' => t('recipeML'),
      'callback' => 'recipe_recipeML_export_multi',
      'format_help' => t('Export all recipes to recipeML based xml format.'),
    ),
    'import_multi' => array(
      'format_name' => t('recipeML'),
      'callback' => 'recipe_recipeML_import_multi',
      'format_help' => t('Import recipes from a recipeML based xml file.'),
    ),
  );
  if (isset($supported[$type])) {
    return array(
      'recipeml' => $supported[$type],
    );
  }
  else {
    return FALSE;
  }
}