function patterns_utils_toString in Patterns 7
Same name and namespace in other branches
- 7.2 includes/utils.inc \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.
Parameters
mixed $pattern:
2 calls to patterns_utils_toString()
- patterns_lab_submit in includes/
forms/ lab.inc - Exports selected patterns either in a file or as a zip-archive
- _patterns_io_get_patterns in includes/
io/ io.inc - 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…
File
- includes/
utils.inc, line 79 - Collectiion of general purpose functions.
Code
function patterns_utils_toString($pattern = NULL) {
$pattern = _patterns_db_get_pattern($pattern);
if (!$pattern) {
return FALSE;
}
return $pattern->name . ' (' . $pattern->title . ')';
}