public function asDataTable()
    {
        $dataArray = $this->getDataArray();
        $dataArrayTwoLevels = $this->getDataArrayWithTwoLevels();

        $subtableByLabel = null;
        if (!empty($dataArrayTwoLevels)) {
            $subtableByLabel = array();
            foreach ($dataArrayTwoLevels as $label => $subTable) {
                $subtableByLabel[$label] = DataTable::makeFromIndexedArray($subTable);
            }
        }
        return DataTable::makeFromIndexedArray($dataArray, $subtableByLabel);
    }
public function asDataTable()
    {
        $dataArray = $this->getDataArray();
        $dataArrayTwoLevels = $this->getDataArrayWithTwoLevels();

        $subtableByLabel = null;
        if (!empty($dataArrayTwoLevels)) {
            $subtableByLabel = array();
            foreach ($dataArrayTwoLevels as $label => $subTable) {
                $subtableByLabel[$label] = DataTable::makeFromIndexedArray($subTable);
            }
        }
        return DataTable::makeFromIndexedArray($dataArray, $subtableByLabel);
    }
public function asDataTable ( ) { $ dataArray = $ this -> getDataArray ( ) ; $ dataArrayTwoLevels = $ this -> getDataArrayWithTwoLevels ( ) ; $ subtableByLabel = null ; if ( ! empty ( $ dataArrayTwoLevels ) ) { $ subtableByLabel = array ( ) ; foreach ( $ dataArrayTwoLevels as $ label => $ subTable ) { $ subtableByLabel [ $ label ] = DataTable :: makeFromIndexedArray ( $ subTable ) ; } } return DataTable :: makeFromIndexedArray ( $ dataArray , $ subtableByLabel ) ; }
Converts array to a datatable

@return \Piwik\DataTable
Converts array to a datatable