function workflow_debug in Workflow 7.2
Same name and namespace in other branches
- 8 workflow.devel.inc \workflow_debug()
Helper function for D8-port: Get some info on screen.
Usage: workflow_debug( __FILE__, __FUNCTION__, __LINE__, '', ''); // @todo: still test this snippet.
Parameters
string $class_name:
string $function_name:
string $line:
string $value1:
string $value2:
See also
workflow_devel module
File
- ./
workflow.module, line 1214 - Support workflows made up of arbitrary states.
Code
function workflow_debug($class_name, $function_name, $line = '', $value1 = '', $value2 = '') {
$debug_switch = FALSE;
// $debug_switch = TRUE;
if (!$debug_switch) {
return;
}
$class_name_elements = explode("\\", $class_name);
$output = 'Testing... function ' . end($class_name_elements) . '::' . $function_name . '/' . $line;
if ($value1) {
$output .= ' = ' . $value1;
}
if ($value2) {
$output .= ' > ' . $value2;
}
drupal_set_message($output, 'warning');
}