| @@ 348-379 (lines=32) @@ | ||
| 345 | ||
| 346 | // データ行の出力. |
|
| 347 | $this->csvExportService->setExportQueryBuilder($qb); |
|
| 348 | $this->csvExportService->exportData(function ($entity, $csvService) use ($app, $request) { |
|
| 349 | ||
| 350 | $Csvs = $csvService->getCsvs(); |
|
| 351 | ||
| 352 | /** @var $Customer \Eccube\Entity\Customer */ |
|
| 353 | $Customer = $entity; |
|
| 354 | ||
| 355 | $ExportCsvRow = new \Eccube\Entity\ExportCsvRow(); |
|
| 356 | ||
| 357 | // CSV出力項目と合致するデータを取得. |
|
| 358 | foreach ($Csvs as $Csv) { |
|
| 359 | // 会員データを検索. |
|
| 360 | $ExportCsvRow->setData($csvService->getData($Csv, $Customer)); |
|
| 361 | ||
| 362 | $event = new EventArgs( |
|
| 363 | array( |
|
| 364 | 'csvService' => $csvService, |
|
| 365 | 'Csv' => $Csv, |
|
| 366 | 'Customer' => $Customer, |
|
| 367 | 'ExportCsvRow' => $ExportCsvRow, |
|
| 368 | ), |
|
| 369 | $request |
|
| 370 | ); |
|
| 371 | $this->eventDispatcher->dispatch(EccubeEvents::ADMIN_CUSTOMER_CSV_EXPORT, $event); |
|
| 372 | ||
| 373 | $ExportCsvRow->pushData(); |
|
| 374 | } |
|
| 375 | ||
| 376 | //$row[] = number_format(memory_get_usage(true)); |
|
| 377 | // 出力. |
|
| 378 | $csvService->fputcsv($ExportCsvRow->getRow()); |
|
| 379 | }); |
|
| 380 | }); |
|
| 381 | ||
| 382 | $now = new \DateTime(); |
|
| @@ 283-312 (lines=30) @@ | ||
| 280 | ||
| 281 | // データ行の出力. |
|
| 282 | $this->csvExportService->setExportQueryBuilder($qb); |
|
| 283 | $this->csvExportService->exportData(function ($entity, $csvService) use ($app, $request) { |
|
| 284 | ||
| 285 | $Csvs = $csvService->getCsvs(); |
|
| 286 | ||
| 287 | /** @var $Category \Eccube\Entity\Category */ |
|
| 288 | $Category = $entity; |
|
| 289 | ||
| 290 | // CSV出力項目と合致するデータを取得. |
|
| 291 | $ExportCsvRow = new \Eccube\Entity\ExportCsvRow(); |
|
| 292 | foreach ($Csvs as $Csv) { |
|
| 293 | $ExportCsvRow->setData($csvService->getData($Csv, $Category)); |
|
| 294 | ||
| 295 | $event = new EventArgs( |
|
| 296 | array( |
|
| 297 | 'csvService' => $csvService, |
|
| 298 | 'Csv' => $Csv, |
|
| 299 | 'Category' => $Category, |
|
| 300 | 'ExportCsvRow' => $ExportCsvRow, |
|
| 301 | ), |
|
| 302 | $request |
|
| 303 | ); |
|
| 304 | $this->eventDispatcher->dispatch(EccubeEvents::ADMIN_PRODUCT_CATEGORY_CSV_EXPORT, $event); |
|
| 305 | ||
| 306 | $ExportCsvRow->pushData(); |
|
| 307 | } |
|
| 308 | ||
| 309 | //$row[] = number_format(memory_get_usage(true)); |
|
| 310 | // 出力. |
|
| 311 | $csvService->fputcsv($ExportCsvRow->getRow()); |
|
| 312 | }); |
|
| 313 | }); |
|
| 314 | ||
| 315 | $now = new \DateTime(); |
|