forked from hechoendrupal/drupal-console
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDialogHelper.php
More file actions
25 lines (20 loc) · 735 Bytes
/
Copy pathDialogHelper.php
File metadata and controls
25 lines (20 loc) · 735 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
<?php
namespace Drupal\AppConsole\Command\Helper;
use Symfony\Component\Console\Helper\DialogHelper as BaseDialogHelper;
use Symfony\Component\Console\Output\OutputInterface;
class DialogHelper extends BaseDialogHelper
{
public function writeSection(OutputInterface $output, $text, $style = 'bg=blue;fg=white')
{
$output->writeln(array(
'',
$this->getHelperSet()->get('formatter')->formatBlock($text, $style, true),
'',
));
}
public function getQuestion($question, $default, $sep = ':')
{
return $default ? sprintf('<info>%s</info> [<comment>%s</comment>]%s ', $question, $default,
$sep) : sprintf('<info>%s</info>%s ', $question, $sep);
}
}