function patterns_results in Patterns 7.2
Same name and namespace in other branches
- 7 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'.
78 calls to patterns_results()
- block_create in patterns_components/
components/ block.inc - Wraps several calls to several drupal_form_submit to create a block. Depending on the type of block (custom or not), a different amount of records will be inserted.
- block_delete in patterns_components/
components/ block.inc - Wraps several a call to drupal_form_submit to delete the settings of a block. This operation is only available for custom blocks (as well as it happens in the UI) since blocks created by custom modules cannot be deleted (only disabled through status)
- block_modify in patterns_components/
components/ block.inc - Wraps several calls to several drupal_form_submit to update the settings of a block. This operation affects only the block table, block_custom table is not affected in case is a custom block
- block_node_type_create in patterns_components/
components/ block.inc - Wraps a call to drupal_form_submit to define a visualization relationship between the given block and content type
- block_node_type_delete in patterns_components/
components/ block.inc - Wraps a call to drupal_form_submit to remove a visualization relationship between the given block and content type
File
- includes/
api/ api.inc, line 172 - API for writing pattern files.
Code
function patterns_results($status = PATTERNS_SUCCESS, $msg = NULL, $result = NULL) {
return array(
'status' => $status,
'msg' => $msg,
'result' => $result,
);
}