public function FormBuilderWebformForm::getComponent in Form Builder 7
Create a webform component array based the form_builder cache.
Parameters
string $element_id: Unique ID of the element.
Return value
array A webform component array.
1 call to FormBuilderWebformForm::getComponent()
- FormBuilderWebformForm::getComponents in modules/
webform/ form_builder_webform.classes.inc - Get a list of component-arrays just like in $node->webform['components'].
File
- modules/
webform/ form_builder_webform.classes.inc, line 88
Class
Code
public function getComponent($element_id) {
module_load_include('inc', 'form_builder_webform', 'form_builder_webform.components');
$element = $this
->getElementArray($element_id);
$component = $element['#webform_component'];
$type = $component['type'];
$component['email'] = 0;
$component['nid'] = $this->formId;
$component['weight'] = $element['#weight'];
// The component can't decide this on it's own.
$component['pid'] = 0;
$component['form_builder_element_id'] = $element_id;
// Allow each component to set any specific settings that can't be mapped.
if ($saved_component = form_builder_webform_component_invoke($type, 'form_builder_save', $component, $element)) {
$component = $saved_component;
}
return $component;
}