You are here

function patterns_utils_toString in Patterns 7.2

Same name and namespace in other branches
  1. 7 includes/ \patterns_utils_toString()

Returns a string representation of a pattern object or array. If an id or the name of the pattern is passed, it tries to load it, and then constructs the name of the pattern.


mixed $pattern:

2 calls to patterns_utils_toString()
patterns_lab_submit in includes/forms/
Exports selected patterns either in a file or as a zip-archive
_patterns_io_get_patterns in includes/io/
Loads all the available patterns from the database. It also checks against the file system, and, if the patterns global configuration options allow it, updates the database with the latest modifications. Notice: enabled patterns will not be updated…


includes/, line 79
Collectiion of general purpose functions.


function patterns_utils_toString($pattern = NULL) {
  $pattern = _patterns_db_get_pattern($pattern);
  if (!$pattern) {
    return FALSE;
  return $pattern->name . ' (' . $pattern->title . ')';