Skip to content

Commit b9806ba

Browse files
committed
Mentioned the new "box" console style
1 parent 5bb7c53 commit b9806ba

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

components/console/helpers/table.rst

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,27 @@ which outputs:
143143
80-902734-1-6 And Then There Were None Agatha Christie
144144
=============== ========================== ==================
145145
146+
You can also set the style to ``box``::
147+
148+
$table->setStyle('box');
149+
$table->render();
150+
151+
which outputs:
152+
153+
.. code-block:: text
154+
155+
┼───────────────┼──────────────────────────┼──────────────────┼
156+
│ ISBN │ Title │ Author │
157+
┼───────────────┼──────────────────────────┼──────────────────┼
158+
│ 99921-58-10-7 │ Divine Comedy │ Dante Alighieri │
159+
│ 9971-5-0210-0 │ A Tale of Two Cities │ Charles Dickens │
160+
│ 960-425-059-0 │ The Lord of the Rings │ J. R. R. Tolkien │
161+
│ 80-902734-1-6 │ And Then There Were None │ Agatha Christie │
162+
┼───────────────┼──────────────────────────┼──────────────────┼
163+
164+
.. versionadded:: 4.1
165+
The ``box`` style was introduced in Symfony 4.1.
166+
146167
If the built-in styles do not fit your need, define your own::
147168

148169
use Symfony\Component\Console\Helper\TableStyle;

0 commit comments

Comments
 (0)