protected function FormBuilderElementBase::addPreRender in Form Builder 7
Add our pre-render function to the element-array.
2 calls to FormBuilderElementBase::addPreRender()
- FormBuilderElementBase::render in ./
form_builder.classes.inc - (Re-)Render an element.
- FormBuilderWebformElement::render in modules/
webform/ form_builder_webform.classes.inc - (Re-)Render an element.
File
- ./
form_builder.classes.inc, line 816
Class
Code
protected function addPreRender($element) {
if (isset($element['#type']) && (!isset($element['#pre_render']) || !in_array('form_builder_pre_render', $element['#pre_render']))) {
$element['#pre_render'] = array_merge(element_info_property($element['#type'], '#pre_render', array()), array(
'form_builder_pre_render',
));
}
return $element;
}