Skip to content

Commit e5b051c

Browse files
committed
minor #16817 [Console] Table vertical rendering usage (yoannrenard)
This PR was squashed before being merged into the 6.1 branch. Discussion ---------- [Console] Table vertical rendering usage Closes #16795 Commits ------- 865bf6b [Console] Table vertical rendering usage
2 parents e9bd9c4 + 865bf6b commit e5b051c

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

components/console/helpers/table.rst

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,31 @@ The output of this command will be:
150150
| (the rest of the rows...) |
151151
+-------+------------+--------------------------------+
152152
153+
Console tables content is displayed horizontally by default.
154+
You can change this behavior via the :method:`Symfony\\Component\\Console\\Helper\\Table::setVertical` method::
155+
156+
// ...
157+
$table->setVertical();
158+
$table->render();
159+
160+
The output of this command will be:
161+
162+
.. code-block:: terminal
163+
164+
+------------------------------+
165+
| ISBN: 99921-58-10-7 |
166+
| Title: Divine Comedy |
167+
| Author: Dante Alighieri |
168+
|------------------------------|
169+
| ISBN: 9971-5-0210-0 |
170+
| Title: A Tale of Two Cities |
171+
| Author: Charles Dickens |
172+
+------------------------------+
173+
174+
.. versionadded:: 6.1
175+
176+
Support for vertical rendering was introduced in Symfony 6.1.
177+
153178
The table style can be changed to any built-in styles via
154179
:method:`Symfony\\Component\\Console\\Helper\\Table::setStyle`::
155180

0 commit comments

Comments
 (0)