Skip to content

Commit 4a814a6

Browse files
Sarah-eitjaviereguiluz
authored andcommitted
[Console] [components] add information about the addRows method - table.rst
1 parent 62ff824 commit 4a814a6

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
@@ -432,3 +432,24 @@ This will display the following table in the terminal:
432432
| Love |
433433
| Symfony |
434434
+---------+
435+
436+
.. tip::
437+
438+
You can create multiple lines using the :method:`Symfony\\Component\\Console\\Helper\\Table::addRows` method::
439+
440+
// ...
441+
$table->addRows([
442+
['Hello', 'World'],
443+
['Love', 'Symfony'],
444+
]);
445+
$table->render();
446+
// ...
447+
448+
This will display:
449+
450+
.. code-block:: terminal
451+
452+
+-------+---------+
453+
| Hello | World |
454+
| Love | Symfony |
455+
+-------+---------+

0 commit comments

Comments
 (0)