You are here

protected function WebformSubmissionConditionsValidator::getBuildElements in Webform 6.x

Same name and namespace in other branches
  1. 8.5 src/WebformSubmissionConditionsValidator.php \Drupal\webform\WebformSubmissionConditionsValidator::getBuildElements()

Build and get visible elements from a form.

Parameters

array $form: An associative array containing the structure of the form.

Return value

array Visible elements.

1 call to WebformSubmissionConditionsValidator::getBuildElements()
WebformSubmissionConditionsValidator::buildForm in src/WebformSubmissionConditionsValidator.php
Apply form #states to visible elements.

File

src/WebformSubmissionConditionsValidator.php, line 889

Class

WebformSubmissionConditionsValidator
Webform submission conditions (#states) validator.

Namespace

Drupal\webform

Code

protected function &getBuildElements(array &$form) {
  if (isset($form['#webform_id']) && isset($form['elements'])) {
    $form_elements =& $form['elements'];
  }
  else {
    $form_elements =& $form;
  }
  $elements = [];
  $this
    ->getBuildElementsRecursive($elements, $form_elements);
  return $elements;
}