class FormBuilderWebformElement in Form Builder 7
Hierarchy
- class \FormBuilderElementBase implements FormBuilderElementInterface
- class \FormBuilderWebformElement
Expanded class hierarchy of FormBuilderWebformElement
1 string reference to 'FormBuilderWebformElement'
- form_builder_webform_form_builder_form_types in modules/
webform/ form_builder_webform.module - Implements hook_form_builder_form_types().
File
- modules/
webform/ form_builder_webform.classes.inc, line 168
View source
class FormBuilderWebformElement extends FormBuilderElementBase {
/**
* {@inheritdoc}
*/
protected function setProperty($property, $value) {
$component =& $this->element['#webform_component'];
$properties = $this
->getProperties();
$properties[$property]
->setValue($component, $value);
}
/**
* {@inheritdoc}
*/
public function render() {
$element = $this->element;
if (isset($element['#webform_component'])) {
$component = $element['#webform_component'];
$new_element = webform_component_invoke($component['type'], 'render', $component, NULL, FALSE);
// Preserve the #weight. It may have been changed by the positions form.
$new_element['#weight'] = $element['#weight'];
$new_element['#key'] = $element['#key'];
$new_element['#webform_component'] = $component;
$new_element['#form_builder'] = $element['#form_builder'];
return $this
->addPreRender($new_element);
}
return $this
->addPreRender($element);
}
public function title() {
return $this->element['#webform_component']['name'];
}
}