You are here

function _patterns_editor_dump_from_db in Patterns 7

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

Helper function which returns the pattern dumped from the database, or an error string.

Parameters

array $pattern The pattern to dump.:

mixed $format The format of the pattern array.:

Return value

mixed $content A string representing the pattern or an error.

1 call to _patterns_editor_dump_from_db()
patterns_edit in includes/forms/editor.inc
Form constructor for editing a pattern. TODO:params

File

includes/forms/editor.inc, line 289
Functions, forms related to the Patterns editor.

Code

function _patterns_editor_dump_from_db($pattern, $format) {
  $content = patterns_parser_dump($pattern, $format);
  if (!$content) {
    $content = t('An error occurred while dumping the pattern in the database here.');
  }
  return $content;
}