function eloqua_webform_load in Eloqua 6
Same name and namespace in other branches
- 7.2 eloqua_webform/eloqua_webform.inc \eloqua_webform_load()
- 7 eloqua_webform/eloqua_webform.inc \eloqua_webform_load()
Loads a webform settings from the database @hook eloqua_form_load ($webform)
Parameters
$nid int:
Return value
object
2 calls to eloqua_webform_load()
- eloqua_form_alter in ./
eloqua.module - Implementation of hook_form_alter().
- eloqua_form_webform_configure_form_alter in ./
eloqua.module - Implementation of hook_form_FORM_ID_alter().
File
- ./
eloqua.inc, line 177
Code
function eloqua_webform_load($nid) {
// Get the raw result from the db
if (!is_numeric($nid)) {
$type = gettype($nid);
watchdog(ELOQUA_WATCHDOG_CATEGORY, t('Invalid argument sent to !module_name (!type).', array(
'!module_name' => __FUNCTION__,
'!type' => $type,
)), array(), WATCHDOG_DEBUG);
return NULL;
}
$webform = _eloqua_webform_load($nid);
if (empty($webform)) {
return NULL;
}
// Send the object around to all of its friends
foreach (module_implements('eloqua_form_load') as $module_name) {
$method = $module_name . '_eloqua_form_load';
$method($webform);
}
return $webform;
}