private function prepareColumns()
    {
        $columns = [];
        $hasId = false;
        foreach ($this->columns as $column) {
            if ($column['name'] === 'id') {
                $hasId = true;
            }
            if (!$column['label']) {
                continue;
            }
            $columnType = null;
            array_push($columns, [
                'name'  => $column['name'],
                'label' => $column['label'],
            ]);
        }
        if (!$hasId) {
            array_unshift($columns, [
                'name'  => 'id',
                'label' => 'ID'
            ]);
        }
        return $columns;
    }
private function prepareColumns()
    {
        $columns = [];
        $hasId = false;
        foreach ($this->columns as $column) {
            if ($column['name'] === 'id') {
                $hasId = true;
            }
            if (!$column['label']) {
                continue;
            }
            $columnType = null;
            array_push($columns, [
                'name'  => $column['name'],
                'label' => $column['label'],
            ]);
        }
        if (!$hasId) {
            array_unshift($columns, [
                'name'  => 'id',
                'label' => 'ID'
            ]);
        }
        return $columns;
    }
private function prepareColumns ( ) { $ columns = [ ] ; $ hasId = false ; foreach ( $ this -> columns as $ column ) { if ( $ column [ 'name' ] === 'id' ) { $ hasId = true ; } if ( ! $ column [ 'label' ] ) { continue ; } $ columnType = null ; array_push ( $ columns , [ 'name' => $ column [ 'name' ] , 'label' => $ column [ 'label' ] , ] ) ; } if ( ! $ hasId ) { array_unshift ( $ columns , [ 'name' => 'id' , 'label' => 'ID' ] ) ; } return $ columns ; }
Prepare columns for excel exporting
@return array
Prepare columns for excel exporting