public static function WebformArrayHelper::flattenAssoc in Webform 8.5
Same name and namespace in other branches
- 6.x 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 285
Class
- WebformArrayHelper
- Provides helper to operate on arrays.
Namespace
Drupal\webform\UtilityCode
public static function &flattenAssoc(array &$build) {
$array = [];
$duplicate_array_keys = [];
self::flattenAssocRecursive($build, $array, $duplicate_array_keys);
return $array;
}