You are here

function patterns_export_start_engine in Patterns 7.2

Same name and namespace in other branches
  1. 7 patterns_export/patterns_export.module \patterns_export_start_engine()

Start the exporting process


string $filename The name or path of the exported file :

array $tagmodules The index of modules/tags/exports_functions :

array $info The info section of the export:

string $to Optional. A valid export destionation (e.g. zip,file,database).: Defaults, 'db'.

string $format A valid patterns format (e.g. yaml,xml,php):

string $mode Optional. A valid patterns execution mode. E.g. (php,batch).: Defaults 'php'.

string $type Defines the type of actions (CREATE or MODIFY) that are going to be created during the export process:

2 calls to patterns_export_start_engine()
drush_patterns_export in ./
Export data from the patterns components to file, zip archive, or database
patterns_export_submit in patterns_export/patterns_export.module
Submit hook of the export form


patterns_export/patterns_export.module, line 265


function patterns_export_start_engine($filename, $tagmodules = array(), $info = array(), $to = PATTERNS_EXPORT_TO_DB, $format = PATTERNS_FORMAT_UNKNOWN, $mode = PATTERNS_EXEC_PHP, $type = PATTERNS_EXPORT_TYPE_MODIFY) {
  $format = patterns_io_get_format_from_file($filename, $format);
  if (!$format) {
    drupal_set_message(t('Unkwnown export format. Aborting.'), 'error');
    return FALSE;
  if (!in_array($mode, array(
  ))) {
    drupal_set_message(t('Unknown execution mode: %mode', array(
      '%mode' => $mode,
    )), 'error');
    return FALSE;
  $func = 'patterns_export_' . $mode;
  return $func($filename, $tagmodules, $info, $to, $format, $type);