You are here

public function ViewsEFFieldsetData::buildFlat in Views Exposed Form Fieldset 8

Build a flat array.

Return value

array The flatten array.

File

src/ViewsEFFieldsetData.php, line 55

Class

ViewsEFFieldsetData
Class ViewsEFFieldsetData.

Namespace

Drupal\views_ef_fieldset

Code

public function buildFlat() {
  $data = [];
  $recursive_iter_iter = new RecursiveIteratorIterator(new ArrayDataItemIterator($this
    ->buildTreeData()), RecursiveIteratorIterator::SELF_FIRST);
  foreach ($recursive_iter_iter as $item) {
    $item['item']['depth'] = $recursive_iter_iter
      ->getDepth();
    $data[] = $item;
  }
  return $data;
}