You are here

protected function FormBase::unindexElements in Form Builder 7.2

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

File

src/FormBase.php, line 211

Class

FormBase

Namespace

Drupal\form_builder

Code

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