function Table::renderRow
Renders table row.
Example:
| 9971-5-0210-0 | A Tale of Two Cities | Charles Dickens |
1 call to Table::renderRow()
- Table::render in vendor/
symfony/ console/ Helper/ Table.php - Renders table to output.
File
-
vendor/
symfony/ console/ Helper/ Table.php, line 530
Class
- Table
- Provides helpers to display a table.
Namespace
Symfony\Component\Console\HelperCode
private function renderRow(array $row, string $cellFormat, ?string $firstCellFormat = null) : void {
$rowContent = $this->renderColumnSeparator(self::BORDER_OUTSIDE);
$columns = $this->getRowColumns($row);
$last = \count($columns) - 1;
foreach ($columns as $i => $column) {
if ($firstCellFormat && 0 === $i) {
$rowContent .= $this->renderCell($row, $column, $firstCellFormat);
}
else {
$rowContent .= $this->renderCell($row, $column, $cellFormat);
}
$rowContent .= $this->renderColumnSeparator($last === $i ? self::BORDER_OUTSIDE : self::BORDER_INSIDE);
}
$this->output
->writeln($rowContent);
}