Cleaned a bit the TableDrop command
This commit is contained in:
parent
53db41026b
commit
2b7cbeacfb
3 changed files with 56 additions and 47 deletions
|
|
@ -44,6 +44,10 @@ abstract class AbstractCommand extends ContainerAwareCommand
|
|||
*/
|
||||
protected $input;
|
||||
|
||||
|
||||
use FormattingHelpers;
|
||||
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
|
|
@ -380,36 +384,6 @@ EOT;
|
|||
return $this->cacheDir;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Comes from the SensioGeneratorBundle.
|
||||
* @see https://github.com/sensio/SensioGeneratorBundle/blob/master/Command/Helper/DialogHelper.php#L52
|
||||
*
|
||||
* @param OutputInterface $output The output.
|
||||
* @param string $text A text message.
|
||||
* @param string $style A style to apply on the section.
|
||||
*/
|
||||
protected function writeSection(OutputInterface $output, $text, $style = 'bg=blue;fg=white')
|
||||
{
|
||||
$output->writeln(array(
|
||||
'',
|
||||
$this->getHelperSet()->get('formatter')->formatBlock($text, $style, true),
|
||||
'',
|
||||
));
|
||||
}
|
||||
|
||||
/**
|
||||
* Ask confirmation from the user.
|
||||
*
|
||||
* @param OutputInterface $output The output.
|
||||
* @param string $question A given question.
|
||||
* @param string $default A default response.
|
||||
*/
|
||||
protected function askConfirmation(OutputInterface $output, $question, $default = null)
|
||||
{
|
||||
return $this->getHelperSet()->get('dialog')->askConfirmation($output, $question, $default);
|
||||
}
|
||||
|
||||
protected function arrayToIni(array $data)
|
||||
{
|
||||
$lines = array();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue