function patterns_results in Patterns 7
Same name and namespace in other branches
- 7.2 includes/api/api.inc \patterns_results()
Helper function to create the associative array of returned values from an invoked function.
Parameters
mixed $status One of [PATTERNS_SUCCESS, PATTERNS_WARN, PATTERNS_ERR]. Required.:
array $msg A message.:
mixed $result Any kind of additional data.:
Return value
array An associative array of the input values with keys 'status', 'msg', 'result'.
71 calls to patterns_results()
- block_patterns_build in patterns_components/
components/ block.inc - block_patterns_callbacks in patterns_components/
components/ block.inc - block_patterns_cleanup in patterns_components/
components/ block.inc - block_patterns_params in patterns_components/
components/ block.inc - block_patterns_prepare in patterns_components/
components/ block.inc
File
- includes/
api/ api.inc, line 174 - API for writing pattern files.
Code
function patterns_results($status = PATTERNS_SUCCESS, $msg = NULL, $result = NULL) {
if ($msg === NULL) {
$msg = t('Execution successful');
}
return array(
'status' => $status,
'msg' => $msg,
'result' => $result,
);
}