You are here

public static function WebformArrayHelper::flattenAssoc in Webform 6.x

Same name and namespace in other branches
  1. 8.5 src/Utility/WebformArrayHelper.php \Drupal\webform\Utility\WebformArrayHelper::flattenAssoc()

Traverse an associative array and collect references to all key/value pairs in an associative array.

Parameters

array $build: An array.

Return value

array An associative array of key/value pairs by reference.

1 call to WebformArrayHelper::flattenAssoc()
webform_examples_accessibility_webform_submission_form_alter in modules/webform_examples_accessibility/webform_examples_accessibility.module
Implements hook_webform_submission_form_alter().

File

src/Utility/WebformArrayHelper.php, line 300

Class

WebformArrayHelper
Provides helper to operate on arrays.

Namespace

Drupal\webform\Utility

Code

public static function &flattenAssoc(array &$build) {
  $array = [];
  $duplicate_array_keys = [];
  self::flattenAssocRecursive($build, $array, $duplicate_array_keys);
  return $array;
}