You are here

protected function ElementBase::addPreRender in Form Builder 7.2

Add our pre-render function to the element-array.

2 calls to ElementBase::addPreRender()
Element::render in modules/webform/src/Element.php
(Re-)Render an element.
ElementBase::render in src/ElementBase.php
(Re-)Render an element.

File

src/ElementBase.php, line 21

Class

ElementBase

Namespace

Drupal\form_builder

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;
}