You are here

function patterns_forms_get_default_format in Patterns 7

Same name and namespace in other branches
  1. 7.2 includes/forms/forms.inc \patterns_forms_get_default_format()

Returns a default format, according to the available parsers. In the following order returns: YAML, XML, PHP, ''.

Return value

mixed String A default value for a form selector

2 calls to patterns_forms_get_default_format()
patterns_export_page1 in patterns_export/patterns_export.module
patterns_lab in includes/forms/lab.inc
@file Functions related to exporting patterns.

File

includes/forms/forms.inc, line 152

Code

function patterns_forms_get_default_format() {
  if (defined('PATTERNS_FORMAT_YAML')) {
    return PATTERNS_FORMAT_YAML;
  }
  if (defined('PATTERNS_FORMAT_XML')) {
    return PATTERNS_FORMAT_XML;
  }
  if (defined('PATTERNS_FORMAT_PHP')) {
    return PATTERNS_FORMAT_PHP;
  }
  return '';
}