You are here

public function FrxCrosstabTest::arrayData in Forena Reports 8

Parameters

array $array:

Return value

array Helper function

1 call to FrxCrosstabTest::arrayData()
FrxCrosstabTest::testFrxCrosstab in tests/src/Unit/Renderer/FrxCrosstabTest.php
Test Crosstab Renderer

File

tests/src/Unit/Renderer/FrxCrosstabTest.php, line 50

Class

FrxCrosstabTest
@group Forena @require module forena @coversDefaultClass \Drupal\forena\FrxPlugin\Renderer\FrxXML

Namespace

Drupal\Tests\forena\Unit\Renderer

Code

public function arrayData(array $array) {
  $new_array = [];
  foreach ($array as $r => $row) {
    $new_row = [];
    foreach ($row as $key => $value) {
      $new_row[$key] = $value['data'];
    }
    $new_array[] = $new_row;
  }
  return $new_array;
}