function webform_localization_component_load in Webform Localization 7
Same name and namespace in other branches
- 7.4 includes/webform_localization.component.sync.inc \webform_localization_component_load()
Load a Webform Component
Parameters
$nid: A node Id.
$cid: A webform component Id.
Return value
A webform component array.
1 call to webform_localization_component_load()
File
- includes/
webform_localization.component.sync.inc, line 184 - Webform Localization Component Sync Functions.
Code
function webform_localization_component_load($nid, $cid) {
$component = db_select('webform_component')
->fields('webform_component')
->condition('nid', $nid, '=')
->condition('cid', $cid, '=')
->execute()
->fetchAllAssoc('nid', PDO::FETCH_ASSOC);
$component[$nid]['nid'] = $nid;
$component[$nid]['extra'] = unserialize($component[$nid]['extra']);
webform_component_defaults($component[$nid]);
return $component[$nid];
}