CsvExportTrait
Opt-in CSV export of the grid ({@see \App\UI\Admin\System\Components\DataGridComponent\DataGrid::enableCsvExport()}).
The csvExport! signal has no RBAC key of its own: it runs under the read gate of the page the
grid is attached to, with only the same-origin signal protection (Nette default). Unlike the
writing signals in HandleTrait (gated by edit/del), it only reads. It exports the current filters and ordering but all
rows without paging, read from the manager in batches (self::CSV_BATCH_SIZE) so that
one unlimited findAll() cannot exhaust memory on large lists.
Table of Contents
Constants
- CSV_BATCH_SIZE : int = 500
- Batch size for reading `findAll()` incrementally.
- CSV_DELIMITER : string = ';'
- Field delimiter: a semicolon (Czech Excel convention), not a comma.
Methods
- handleCsvExport() : void
Constants
CSV_BATCH_SIZE
Batch size for reading `findAll()` incrementally.
private
int
CSV_BATCH_SIZE
= 500
CSV_DELIMITER
Field delimiter: a semicolon (Czech Excel convention), not a comma.
private
string
CSV_DELIMITER
= ';'
Methods
handleCsvExport()
public
handleCsvExport() : void