You are here

protected function FormTest::deleteComponentInfo in Form Builder 7.2

Remove the #webform_component sub-array from an element.

1 call to FormTest::deleteComponentInfo()
FormTest::testPreview in modules/webform/tests/FormTest.php
Test the form builder preview.

File

modules/webform/tests/FormTest.php, line 94

Class

FormTest
Integration test for the webform integration.

Namespace

Drupal\form_builder_webform

Code

protected function deleteComponentInfo($element) {
  unset($element['#webform_component']);
  foreach (element_children($element, FALSE) as $key) {
    $element[$key] = $this
      ->deleteComponentInfo($element[$key]);
  }
  return $element;
}