You are here

protected function FormBuilderFormBase::unindexElements in Form Builder 7

Remove an element and it's children from the index.

File

./form_builder.classes.inc, line 529

Class

FormBuilderFormBase

Code

protected function unindexElements($element) {
  if ($element instanceof FormBuilderElementInterface) {
    unset($this->elements[$element
      ->getId()]);
  }
  foreach ($element
    ->getChildren() as $child) {
    $this
      ->unindexElements($child);
  }
}