| @@ 304-334 (lines=31) @@ | ||
| 301 | ||
| 302 | // データ行の出力. |
|
| 303 | $this->csvExportService->setExportQueryBuilder($qb); |
|
| 304 | $this->csvExportService->exportData(function ($entity, $csvService) use ($request) { |
|
| 305 | $Csvs = $csvService->getCsvs(); |
|
| 306 | ||
| 307 | /** @var $Customer \Eccube\Entity\Customer */ |
|
| 308 | $Customer = $entity; |
|
| 309 | ||
| 310 | $ExportCsvRow = new \Eccube\Entity\ExportCsvRow(); |
|
| 311 | ||
| 312 | // CSV出力項目と合致するデータを取得. |
|
| 313 | foreach ($Csvs as $Csv) { |
|
| 314 | // 会員データを検索. |
|
| 315 | $ExportCsvRow->setData($csvService->getData($Csv, $Customer)); |
|
| 316 | ||
| 317 | $event = new EventArgs( |
|
| 318 | [ |
|
| 319 | 'csvService' => $csvService, |
|
| 320 | 'Csv' => $Csv, |
|
| 321 | 'Customer' => $Customer, |
|
| 322 | 'ExportCsvRow' => $ExportCsvRow, |
|
| 323 | ], |
|
| 324 | $request |
|
| 325 | ); |
|
| 326 | $this->eventDispatcher->dispatch(EccubeEvents::ADMIN_CUSTOMER_CSV_EXPORT, $event); |
|
| 327 | ||
| 328 | $ExportCsvRow->pushData(); |
|
| 329 | } |
|
| 330 | ||
| 331 | //$row[] = number_format(memory_get_usage(true)); |
|
| 332 | // 出力. |
|
| 333 | $csvService->fputcsv($ExportCsvRow->getRow()); |
|
| 334 | }); |
|
| 335 | }); |
|
| 336 | ||
| 337 | $now = new \DateTime(); |
|
| @@ 302-330 (lines=29) @@ | ||
| 299 | ||
| 300 | // データ行の出力. |
|
| 301 | $this->csvExportService->setExportQueryBuilder($qb); |
|
| 302 | $this->csvExportService->exportData(function ($entity, $csvService) use ($request) { |
|
| 303 | $Csvs = $csvService->getCsvs(); |
|
| 304 | ||
| 305 | /** @var $Category \Eccube\Entity\Category */ |
|
| 306 | $Category = $entity; |
|
| 307 | ||
| 308 | // CSV出力項目と合致するデータを取得. |
|
| 309 | $ExportCsvRow = new \Eccube\Entity\ExportCsvRow(); |
|
| 310 | foreach ($Csvs as $Csv) { |
|
| 311 | $ExportCsvRow->setData($csvService->getData($Csv, $Category)); |
|
| 312 | ||
| 313 | $event = new EventArgs( |
|
| 314 | [ |
|
| 315 | 'csvService' => $csvService, |
|
| 316 | 'Csv' => $Csv, |
|
| 317 | 'Category' => $Category, |
|
| 318 | 'ExportCsvRow' => $ExportCsvRow, |
|
| 319 | ], |
|
| 320 | $request |
|
| 321 | ); |
|
| 322 | $this->eventDispatcher->dispatch(EccubeEvents::ADMIN_PRODUCT_CATEGORY_CSV_EXPORT, $event); |
|
| 323 | ||
| 324 | $ExportCsvRow->pushData(); |
|
| 325 | } |
|
| 326 | ||
| 327 | //$row[] = number_format(memory_get_usage(true)); |
|
| 328 | // 出力. |
|
| 329 | $csvService->fputcsv($ExportCsvRow->getRow()); |
|
| 330 | }); |
|
| 331 | }); |
|
| 332 | ||
| 333 | $now = new \DateTime(); |
|