You are here

function _patterns_lab_get_exp_to_options in Patterns 7.2

Same name and namespace in other branches
  1. 7 includes/forms/lab.inc \_patterns_lab_get_exp_to_options()

Builds an associative array of export options.

Checks if zip compression is available.

2 calls to _patterns_lab_get_exp_to_options()
patterns_forms_get_export_to_selector in includes/forms/forms.inc
patterns_lab in includes/forms/lab.inc
@file Functions related to exporting patterns.

File

includes/forms/lab.inc, line 240
Functions related to exporting patterns.

Code

function _patterns_lab_get_exp_to_options() {
  $options = array(
    PATTERNS_EXPORT_TO_DB => t('Import into the database'),
    PATTERNS_EXPORT_TO_FILE => t('Download as a pattern file'),
  );
  if (class_exists('ZipArchive')) {
    $options[PATTERNS_EXPORT_TO_ZIP] = t('Download as a zip-archive');
  }
  return $options;
}