You are here

public function OptionsFormHelperTrait::flattenMultidimensionalArray in FullCalendar 8.5

Same name and namespace in other branches
  1. 8.2 src/Plugin/fullcalendar/type/OptionsFormHelperTrait.php \Drupal\fullcalendar\Plugin\fullcalendar\type\OptionsFormHelperTrait::flattenMultidimensionalArray()
  2. 8.4 src/Plugin/fullcalendar/type/OptionsFormHelperTrait.php \Drupal\fullcalendar\Plugin\fullcalendar\type\OptionsFormHelperTrait::flattenMultidimensionalArray()

@todo: Review. Flatten a multidimensional array.

Parameters

array $array: The input array.

Return value

array The fllattened array.

1 call to OptionsFormHelperTrait::flattenMultidimensionalArray()
FullCalendar::preView in src/Plugin/fullcalendar/type/FullCalendar.php

File

src/Plugin/fullcalendar/type/OptionsFormHelperTrait.php, line 383

Class

OptionsFormHelperTrait

Namespace

Drupal\fullcalendar\Plugin\fullcalendar\type

Code

public function flattenMultidimensionalArray($array) {
  $it = new RecursiveIteratorIterator(new RecursiveArrayIterator($array));
  return iterator_to_array($it, TRUE);
}