Skip to content

Commit

Permalink
minor #3526 Changes for Console component (ifdattic)
Browse files Browse the repository at this point in the history
This PR was merged into the 2.3 branch.

Discussion
----------

Changes for Console component

Fix the placement of 'the'.

Add url for 'ask' method.

Adjust horizontal scrolling and line length.

| Q             | A
| ------------- | ---
| Doc fix?      | yes
| New docs?     | no
| Applies to    | 2.3
| Fixed tickets |

Commits
-------

f97c4a6 Fix the placement of 'the'.
  • Loading branch information
weaverryan committed Feb 4, 2014
2 parents 6848bed + f97c4a6 commit 8973c81
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions components/console/helpers/dialoghelper.rst
Expand Up @@ -12,8 +12,8 @@ helper set, which you can get by calling
$dialog = $this->getHelperSet()->get('dialog'); $dialog = $this->getHelperSet()->get('dialog');


All the methods inside the Dialog Helper have an All the methods inside the Dialog Helper have an
:class:`Symfony\\Component\\Console\\Output\\OutputInterface` as first the :class:`Symfony\\Component\\Console\\Output\\OutputInterface` as the first
argument, the question as the second argument and the default value as last argument, the question as the second argument and the default value as the last
argument. argument.


Asking the User for confirmation Asking the User for confirmation
Expand Down Expand Up @@ -52,8 +52,9 @@ if you want to know a bundle name, you can add this to your command::
); );


The user will be asked "Please enter the name of the bundle". They can type The user will be asked "Please enter the name of the bundle". They can type
some name which will be returned by the ``ask`` method. If they leave it empty, some name which will be returned by the
the default value (``AcmeDemoBundle`` here) is returned. :method:`Symfony\\Component\\Console\\Helper\\DialogHelper::ask` method.
If they leave it empty, the default value (``AcmeDemoBundle`` here) is returned.


Autocompletion Autocompletion
~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~
Expand Down Expand Up @@ -235,9 +236,12 @@ this set the seventh argument to ``true``::
return $colors[$c]; return $colors[$c];
}, $selected); }, $selected);


$output->writeln('You have just selected: ' . implode(', ', $selectedColors)); $output->writeln(
'You have just selected: ' . implode(', ', $selectedColors)
);


Now, when the user enters ``1,2``, the result will be: ``You have just selected: blue, yellow``. Now, when the user enters ``1,2``, the result will be:
``You have just selected: blue, yellow``.


Testing a Command which expects input Testing a Command which expects input
------------------------------------- -------------------------------------
Expand Down

0 comments on commit 8973c81

Please sign in to comment.