diff --git a/components/console/helpers/table.rst b/components/console/helpers/table.rst index df828beeafa..7943df8c69c 100644 --- a/components/console/helpers/table.rst +++ b/components/console/helpers/table.rst @@ -143,6 +143,27 @@ which outputs: 80-902734-1-6 And Then There Were None Agatha Christie =============== ========================== ================== +You can also set the style to ``box``:: + + $table->setStyle('box'); + $table->render(); + +which outputs: + +.. code-block:: text + + ┼───────────────┼──────────────────────────┼──────────────────┼ + │ ISBN │ Title │ Author │ + ┼───────────────┼──────────────────────────┼──────────────────┼ + │ 99921-58-10-7 │ Divine Comedy │ Dante Alighieri │ + │ 9971-5-0210-0 │ A Tale of Two Cities │ Charles Dickens │ + │ 960-425-059-0 │ The Lord of the Rings │ J. R. R. Tolkien │ + │ 80-902734-1-6 │ And Then There Were None │ Agatha Christie │ + ┼───────────────┼──────────────────────────┼──────────────────┼ + +.. versionadded:: 4.1 + The ``box`` style was introduced in Symfony 4.1. + If the built-in styles do not fit your need, define your own:: use Symfony\Component\Console\Helper\TableStyle;
Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.
Alternative Proxies: