Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/662-task-reports-export-csv' int…
Browse files Browse the repository at this point in the history
…o 662-task-reports-export-csv

# Conflicts:
#	src/CustomReport/Controller/Export/Csv/ExportController.php
#	src/Export/ExportServiceInterface.php
  • Loading branch information
mcop1 committed Jan 20, 2025
2 parents 37d8f6f + 8a4e0e0 commit 92b133e
Show file tree
Hide file tree
Showing 6 changed files with 4 additions and 17 deletions.
3 changes: 1 addition & 2 deletions src/Asset/Service/ExecutionEngine/CsvService.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@
use Pimcore\Bundle\GenericExecutionEngineBundle\Model\Job;
use Pimcore\Bundle\GenericExecutionEngineBundle\Model\JobStep;
use Pimcore\Bundle\StudioBackendBundle\Asset\ExecutionEngine\AutomationAction\Messenger\Messages\CsvAssetCollectionMessage;
use Pimcore\Bundle\StudioBackendBundle\Export\ExecutionEngine\AutomationAction\Messenger\Messages\CsvCreationMessage;
use Pimcore\Bundle\StudioBackendBundle\Asset\ExecutionEngine\AutomationAction\Messenger\Messages\CsvFolderCollectionMessage;
use Pimcore\Bundle\StudioBackendBundle\Asset\ExecutionEngine\Util\JobSteps;
use Pimcore\Bundle\StudioBackendBundle\Asset\MappedParameter\ExportAssetParameter;
use Pimcore\Bundle\StudioBackendBundle\Asset\MappedParameter\ExportFolderParameter;
use Pimcore\Bundle\StudioBackendBundle\ExecutionEngine\Util\Config;
use Pimcore\Bundle\StudioBackendBundle\ExecutionEngine\Util\Jobs;
use Pimcore\Bundle\StudioBackendBundle\ExecutionEngine\Util\StepConfig;
use Pimcore\Bundle\StudioBackendBundle\Export\ExecutionEngine\AutomationAction\Messenger\Messages\CsvCreationMessage;
use Pimcore\Bundle\StudioBackendBundle\Security\Service\SecurityServiceInterface;
use Pimcore\Model\Element\ElementDescriptor;
use Pimcore\Bundle\StudioBackendBundle\Export\ExecutionEngine\Util\JobSteps as ExportJobSteps;
Expand Down Expand Up @@ -83,7 +83,6 @@ public function generateCsvFileForFolders(ExportFolderParameter $exportFolderPar
);
}


private function generateCsvFileJob(
array $elements,
array $collectionSettings,
Expand Down
2 changes: 0 additions & 2 deletions src/Asset/Service/ExecutionEngine/CsvServiceInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,8 @@

namespace Pimcore\Bundle\StudioBackendBundle\Asset\Service\ExecutionEngine;

use League\Flysystem\FilesystemException;
use Pimcore\Bundle\StudioBackendBundle\Asset\MappedParameter\ExportAssetParameter;
use Pimcore\Bundle\StudioBackendBundle\Asset\MappedParameter\ExportFolderParameter;
use Pimcore\Bundle\StudioBackendBundle\Grid\Util\Collection\ColumnCollection;

/**
* @internal
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ public function __construct(
public function exportCsv(
#[MapRequestPayload] ExportCustomReportParameter $exportCustomReportParameter
): Response {
//TODO adapt code
return $this->jsonResponse(
$this->csvService->generateCsvFile(
$exportCustomReportParameter
Expand Down
5 changes: 2 additions & 3 deletions src/Export/Csv/CsvExportService.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public function createExportFile(
$columns,
true
);
if($withHeaders) {
if ($withHeaders) {
$headers = $this->getHeaders($columnCollection, $withGroup);
}
if ($delimiter === null) {
Expand Down Expand Up @@ -101,8 +101,7 @@ public function cleanUpFileSystem(int $jobRunId): void
private function createDirectory(
string $fileName,
FilesystemOperator $storage
): void
{
): void {
$storage->createDirectory(
$fileName
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@

use Exception;
use League\Flysystem\FilesystemException;
use Pimcore\Bundle\StudioBackendBundle\Export\ExecutionEngine\AutomationAction\Messenger\Messages\CsvCreationMessage;
use Pimcore\Bundle\StudioBackendBundle\ExecutionEngine\AutomationAction\AbstractHandler;
use Pimcore\Bundle\StudioBackendBundle\ExecutionEngine\Util\Config;
use Pimcore\Bundle\StudioBackendBundle\ExecutionEngine\Util\StepConfig;
use Pimcore\Bundle\StudioBackendBundle\ExecutionEngine\Util\Trait\HandlerProgressTrait;
use Pimcore\Bundle\StudioBackendBundle\Export\Csv\CsvExportService;
use Pimcore\Bundle\StudioBackendBundle\Export\ExecutionEngine\AutomationAction\Messenger\Messages\CsvCreationMessage;
use Pimcore\Bundle\StudioBackendBundle\Mercure\Service\PublishServiceInterface;
use Symfony\Component\Messenger\Attribute\AsMessageHandler;

Expand Down
8 changes: 0 additions & 8 deletions src/Export/ExportServiceInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,6 @@

namespace Pimcore\Bundle\StudioBackendBundle\Export;

use League\Flysystem\FilesystemException;
use Pimcore\Bundle\GenericExecutionEngineBundle\Model\Job;
use Pimcore\Bundle\GenericExecutionEngineBundle\Model\JobStep;
use Pimcore\Bundle\StudioBackendBundle\Asset\MappedParameter\ExportAssetParameter;
use Pimcore\Bundle\StudioBackendBundle\Asset\MappedParameter\ExportFolderParameter;
use Pimcore\Bundle\StudioBackendBundle\ExecutionEngine\Util\Jobs;
use Pimcore\Bundle\StudioBackendBundle\Grid\Util\Collection\ColumnCollection;

/**
* @internal
*/
Expand Down

0 comments on commit 92b133e

Please sign in to comment.