You are here

public function FormBase::getElementsInPreOrder in Form Builder 7.2

Get element objects in depth-first pre-order.

2 calls to FormBase::getElementsInPreOrder()
Form::getComponents in modules/webform/src/Form.php
Get a list of component-arrays just like in $node->webform['components'].
FormBase::preview in src/FormBase.php
Build form-tree from element objects.

File

src/FormBase.php, line 361

Class

FormBase

Namespace

Drupal\form_builder

Code

public function getElementsInPreOrder() {
  $elements = array();
  foreach ($this
    ->getElementIdsInPreOrder() as $id) {
    $elements[$id] = $this
      ->getElement($id);
  }
  return $elements;
}