function webform_component_invoke in Webform 7.4
Same name and namespace in other branches
- 6.3 webform.module \webform_component_invoke()
- 7.3 webform.module \webform_component_invoke()
Invoke a component callback.
Parameters
$type: The component type as a string.
$callback: The callback to execute.
...: Any additional parameters required by the $callback.
Return value
mixed Return value of the callback on success and FALSE on failure.
18 calls to webform_component_invoke()
- theme_webform_results_table in includes/
webform.report.inc - Theme the results table displaying all the submissions for a particular node.
- WebformComponentsTestCase::testWebformComponents in tests/
WebformComponentsTestCase.test - Webform module component tests.
- WebformGeneralTestCase::testWebformCreateNewType in tests/
WebformGeneralTestCase.test - Test webform-enabling a different node type and testing behavior.
- webform_component_defaults in includes/
webform.components.inc - Populate a component with the defaults for that type.
- webform_component_delete in includes/
webform.components.inc - Delete a Webform component.
File
- ./
webform.module, line 4960 - This module provides a simple way to create forms and questionnaires.
Code
function webform_component_invoke($type, $callback) {
$args = func_get_args();
$type = array_shift($args);
$callback = array_shift($args);
$function = '_webform_' . $callback . '_' . $type;
webform_component_include($type);
if (function_exists($function)) {
return call_user_func_array($function, $args);
}
}