Skip to content

Show console table examples in a console terminal #10090

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 19, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions components/console/helpers/table.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Table

When building a console application it may be useful to display tabular data:

.. code-block:: text
.. code-block:: terminal

+---------------+--------------------------+------------------+
| ISBN | Title | Author |
Expand Down Expand Up @@ -54,7 +54,7 @@ You can add a table separator anywhere in the output by passing an instance of
array('80-902734-1-6', 'And Then There Were None', 'Agatha Christie'),
));

.. code-block:: text
.. code-block:: terminal

+---------------+--------------------------+------------------+
| ISBN | Title | Author |
Expand All @@ -78,7 +78,7 @@ The table style can be changed to any built-in styles via

This code results in:

.. code-block:: text
.. code-block:: terminal

ISBN Title Author
99921-58-10-7 Divine Comedy Dante Alighieri
Expand All @@ -93,7 +93,7 @@ You can also set the style to ``borderless``::

which outputs:

.. code-block:: text
.. code-block:: terminal

=============== ========================== ==================
ISBN Title Author
Expand Down Expand Up @@ -169,7 +169,7 @@ To make a table cell that spans multiple columns you can use a :class:`Symfony\\

This results in:

.. code-block:: text
.. code-block:: terminal

+---------------+---------------+-----------------+
| ISBN | Title | Author |
Expand All @@ -192,7 +192,7 @@ This results in:

This generates:

.. code-block:: text
.. code-block:: terminal

+-------+-------+--------+
| Main table title |
Expand Down Expand Up @@ -223,7 +223,7 @@ In a similar way you can span multiple rows::

This outputs:

.. code-block:: text
.. code-block:: terminal

+----------------+---------------+---------------------+
| ISBN | Title | Author |
Expand Down