function webform_localization_component_load in Webform Localization 7.4
Same name and namespace in other branches
- 7 includes/webform_localization.component.sync.inc \webform_localization_component_load()
Load a Webform Component.
Parameters
int $nid: A node Id.
int $cid: A webform component Id.
Return value
array A webform component array.
1 call to webform_localization_component_load()
File
- includes/
webform_localization.component.sync.inc, line 190 - 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];
}