Skip to content

Commit fe56c21

Browse files
committed
minor #19373 [Console] [components] add information about the addRows method - table.rst (Sarah-eit)
This PR was squashed before being merged into the 5.4 branch. Discussion ---------- [Console] [components] add information about the addRows method - table.rst Added information about the "addRows" method. File : table.rst <!-- If your pull request fixes a BUG, use the oldest maintained branch that contains the bug (see https://symfony.com/releases for the list of maintained branches). If your pull request documents a NEW FEATURE, use the same Symfony branch where the feature was introduced (and `6.x` for features of unreleased versions). --> Commits ------- 4a814a6 [Console] [components] add information about the addRows method - table.rst
2 parents bfcaf83 + 4a814a6 commit fe56c21

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)