protected function CSVExporter::collapseRow in Loft Data Grids 7.2
Same name and namespace in other branches
- 6.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 the string content of $this->output and return $this for chaining.
- CSVExporter::compile in vendor/
aklump/ loft_data_grids/ src/ AKlump/ LoftDataGrids/ CSVExporter.php - Build the string content of $this->output and return $this for chaining.
- HTMLExporter::compile in vendor/
aklump/ loft_data_grids/ src/ AKlump/ LoftDataGrids/ HTMLExporter.php - Build the string content of $this->output and return $this for chaining.
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 65
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;
}