Issue #3613150: Extract export logic from AiMeteringController into a dedicated service

Extracts exportCsv(), exportJson(), exportLogJson() and their private helpers into a new UsageExportService, injected into AiMeteringController. The controller's export methods become thin wrappers. Also updates ai_metering_views_pre_view() to call UsageExportService::buildExportFilename() instead of the controller. No behavior change: full existing test suite passes unmodified, plus 5 new kernel tests for the extracted service.

Closes #3613150

https://www.drupal.org/project/ai_metering/issues/3613150

Edited by Jérôme Tchania

Merge request reports

Loading