function Table::fillCells
fill cells for a row that contains colspan > 1.
1 call to Table::fillCells()
- Table::buildTableRows in vendor/
symfony/ console/ Helper/ Table.php
File
-
vendor/
symfony/ console/ Helper/ Table.php, line 744
Class
- Table
- Provides helpers to display a table.
Namespace
Symfony\Component\Console\HelperCode
private function fillCells(iterable $row) : iterable {
$newRow = [];
foreach ($row as $column => $cell) {
$newRow[] = $cell;
if ($cell instanceof TableCell && $cell->getColspan() > 1) {
foreach (range($column + 1, $column + $cell->getColspan() - 1) as $position) {
// insert empty value at column position
$newRow[] = '';
}
}
}
return $newRow ?: $row;
}