ProductExportService
in package
Table of Contents
Properties
- $entityManager : EntityManagerInterface
Methods
- __construct() : mixed
- export() : StreamedResponse
- Export products to an Excel file and return a StreamedResponse.
- buildSpreadsheet() : Spreadsheet
- Build a styled PhpSpreadsheet workbook from the product list.
- getFilteredProducts() : array<string|int, mixed>
- Build the filtered product query and return results.
- translateStatus() : string
- Translate the product status constant to a French label.
Properties
$entityManager read-only
private
EntityManagerInterface
$entityManager
Methods
__construct()
public
__construct(EntityManagerInterface $entityManager) : mixed
Parameters
- $entityManager : EntityManagerInterface
export()
Export products to an Excel file and return a StreamedResponse.
public
export(int $pointOfSaleId[, array<string|int, mixed> $filters = [] ]) : StreamedResponse
Parameters
- $pointOfSaleId : int
- $filters : array<string|int, mixed> = []
-
Associative array of filter values
Return values
StreamedResponsebuildSpreadsheet()
Build a styled PhpSpreadsheet workbook from the product list.
private
buildSpreadsheet(array<string|int, Product> $products) : Spreadsheet
Parameters
- $products : array<string|int, Product>
Return values
SpreadsheetgetFilteredProducts()
Build the filtered product query and return results.
private
getFilteredProducts(int $pointOfSaleId, array<string|int, mixed> $filters) : array<string|int, mixed>
Parameters
- $pointOfSaleId : int
- $filters : array<string|int, mixed>
Return values
array<string|int, mixed>translateStatus()
Translate the product status constant to a French label.
private
translateStatus(string|null $status) : string
Parameters
- $status : string|null