Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Changes for Console component#3526

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
weaverryan merged 1 commit intosymfony:2.3fromifdattic:changes-to-components-console
Feb 4, 2014
Merged
Changes fromall 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
16 changes: 10 additions & 6 deletionscomponents/console/helpers/dialoghelper.rst
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -12,8 +12,8 @@ helper set, which you can get by calling
$dialog = $this->getHelperSet()->get('dialog');

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

Asking the User for confirmation
Expand DownExpand 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
some name which will be returned by the ``ask`` method. If they leave it empty,
the default value (``AcmeDemoBundle`` here) is returned.
some name which will be returned by the
:method:`Symfony\\Component\\Console\\Helper\\DialogHelper::ask` method.
If they leave it empty, the default value (``AcmeDemoBundle`` here) is returned.

Autocompletion
~~~~~~~~~~~~~~
Expand DownExpand Up@@ -235,9 +236,12 @@ this set the seventh argument to ``true``::
return $colors[$c];
}, $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
-------------------------------------
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp