extract content rendering into separate method
This commit is contained in:
@ -225,9 +225,7 @@ abstract class ExportBase implements QueryBase
|
||||
*/
|
||||
protected function executeExport(string $format, $path): string
|
||||
{
|
||||
[$rows, $fieldNames] = $this->getExportData($this->getQuery());
|
||||
|
||||
$content = $this->renderContent($rows, $fieldNames, $format);
|
||||
$content = $this->getContent( $format );
|
||||
|
||||
/** @var $oFS d3filesystem */
|
||||
$oFS = $this->getFileSystem();
|
||||
@ -260,4 +258,21 @@ abstract class ExportBase implements QueryBase
|
||||
{
|
||||
return oxNew(d3filesystem::class);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $format
|
||||
*
|
||||
* @return string
|
||||
* @throws DatabaseConnectionException
|
||||
* @throws DatabaseErrorException
|
||||
* @throws Exceptions\NoSuitableRendererException
|
||||
*/
|
||||
public function getContent( string $format ): string
|
||||
{
|
||||
[ $rows, $fieldNames ] = $this->getExportData( $this->getQuery() );
|
||||
|
||||
$content = $this->renderContent( $rows, $fieldNames, $format );
|
||||
|
||||
return $content;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user