8000 minor #15975 [Console] Document `SymfonyStyle` additions (kbond) · symfony/symfony-docs@b871d8e · GitHub
[go: up one dir, main page]

Skip to content

Commit b871d8e

Browse files
committed
minor #15975 [Console] Document SymfonyStyle additions (kbond)
This PR was merged into the 5.4 branch. Discussion ---------- [Console] Document `SymfonyStyle` additions Docs for symfony/symfony#43595. Fixes #15969. Commits ------- 2d2f035 document SymfonyStyle additions
2 parents bf1e1c7 + 2d2f035 commit b871d8e

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

console/style.rst

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,14 @@ Content Methods
165165
['foo4' => 'bar4']
166166
);
167167

168+
:method:`Symfony\\Component\\Console\\Style\\SymfonyStyle::createTable`
169+
Creates an instance of :class:`Symfony\\Component\\Console\\Helper\\Table`
170+
styled according to the Symfony Style Guide.
171+
172+
.. versionadded:: 5.4
173+
174+
The ``createTable()`` method was introduced in Symfony 5.4.
175+
168176
:method:`Symfony\\Component\\Console\\Style\\SymfonyStyle::newLine`
169177
It displays a blank line in the command output. Although it may seem useful,
170178
most of the times you won't need it at all. The reason is that every helper
@@ -243,6 +251,24 @@ Progress Bar Methods
243251

244252
$io->progressFinish();
245253

254+
:method:`Symfony\\Component\\Console\\Style\\SymfonyStyle::progressIterate`
255+
If your progress bar loops over an iterable collection, use the
256+
``progressIterate()`` helper::
257+
258+
$iterable = [1, 2];
259+
260+
foreach ($io->progressIterate($iterable) as $value) {
261+
// ... do some work
262+
}
263+
264+
.. versionadded:: 5.4
265+
266+
The ``progressIterate`` method was introduced in Symfony 5.4.
267+
268+
:method:`Symfony\\Component\\Console\\Style\\SymfonyStyle::createProgressBar`
269+
Creates an instance of :class:`Symfony\\Component\\Console\\Helper\\ProgressBar`
270+
styled according to the Symfony Style Guide.
271+
246272
User Input Methods
247273
~~~~~~~~~~~~~~~~~~
248274

0 commit comments

Comments
 (0)
0