minor #8487 [FrameworkBundle] The config:dump-reference command shows the list of bundles with the table helper (saro0h)

This PR was merged into the master branch.

Discussion
----------

[FrameworkBundle] The config:dump-reference command shows the list of bundles with the table helper

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no

Commits
-------

31c6c62 [FrameworkBundle] The config:dump-reference command shows the list of bundles with the table helper
This commit is contained in:
Fabien Potencier 2013-10-01 19:32:30 +02:00
commit e47677edd5
1 changed files with 5 additions and 1 deletions

View File

@ -69,10 +69,14 @@ EOF
if (empty($name)) {
$output->writeln('Available registered bundles with their extension alias if available:');
$table = $this->getHelperSet()->get('table');
$table->setHeaders(array('Bundle name','Extension alias'));
foreach ($bundles as $bundle) {
$extension = $bundle->getContainerExtension();
$output->writeln($bundle->getName().($extension ? ': '.$extension->getAlias() : ''));
$table->addRow(array($bundle->getName(), $extension ? $extension->getAlias() : ''));
}
$table->render($output);
return;
}