protected function CSVExporter::collapseRow in Loft Data Grids 6.2
Same name and namespace in other branches
- 7.2 vendor/aklump/loft_data_grids/src/AKlump/LoftDataGrids/CSVExporter.php \AKlump\LoftDataGrids\CSVExporter::collapseRow()
Collapse a row
3 calls to CSVExporter::collapseRow()
- BootstrapHTMLExporter::compile in vendor/
aklump/ loft_data_grids/ src/ AKlump/ LoftDataGrids/ BootstrapHTMLExporter.php - Build $this->output in prep for export/save
- CSVExporter::compile in vendor/
aklump/ loft_data_grids/ src/ AKlump/ LoftDataGrids/ CSVExporter.php - Build $this->output in prep for export/save
- HTMLExporter::compile in vendor/
aklump/ loft_data_grids/ src/ AKlump/ LoftDataGrids/ HTMLExporter.php - Build $this->output in prep for export/save
1 method overrides CSVExporter::collapseRow()
- FlatTextExporter::collapseRow in vendor/
aklump/ loft_data_grids/ src/ AKlump/ LoftDataGrids/ FlatTextExporter.php - Collapse a row
File
- vendor/
aklump/ loft_data_grids/ src/ AKlump/ LoftDataGrids/ CSVExporter.php, line 58
Class
- CSVExporter
- Class CSVExporter
Namespace
AKlump\LoftDataGridsCode
protected function collapseRow($row) {
$output = '';
// Check if we're dealing with a simple or complex row
if (isset($row['data'])) {
foreach ($row as $key => $value) {
if ($key == 'data') {
$cells = $value;
}
}
}
else {
$cells = $row;
}
$output = array();
if (count($cells)) {
foreach ($cells as $column => $cell) {
$output[] = $this
->collapseCell($cell, $column);
}
}
$output = $this->format->bol . implode($this->format->sep, $output) . $this->format->eol;
return $output;
}