change deprecated CSV export code
This commit is contained in:
parent
e1502b274e
commit
ea77239510
@ -36,13 +36,12 @@ class Csv implements RendererInterface
|
|||||||
$csv = $this->getCsv();
|
$csv = $this->getCsv();
|
||||||
$csv->insertOne( $fieldNames );
|
$csv->insertOne( $fieldNames );
|
||||||
$csv->insertAll( $rows );
|
$csv->insertAll( $rows );
|
||||||
|
return $csv->toString();
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
/** @var RenderException $newException */
|
/** @var RenderException $newException */
|
||||||
$newException = oxNew(RenderException::class, $e->getMessage(), $e->getCode(), $e );
|
$newException = oxNew(RenderException::class, $e->getMessage(), $e->getCode(), $e );
|
||||||
throw $newException;
|
throw $newException;
|
||||||
}
|
}
|
||||||
|
|
||||||
return $csv->getContent();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getFileExtension(): string
|
public function getFileExtension(): string
|
||||||
|
Loading…
Reference in New Issue
Block a user