Skip to content

Commit

Permalink
Merge pull request #4 from Netmisa/considerate-parent-bundle
Browse files Browse the repository at this point in the history
Commands updated to allow parent bundle
  • Loading branch information
ngodfraind committed Feb 17, 2015
2 parents c895dce + 47960cc commit 6957f44
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion Command/AbstractCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,15 @@ function ($message) use ($output) {
protected function getTargetBundle(InputInterface $input)
{
$bundleName = $input->getArgument('bundle');
$bundles = $this->getContainer()->get('kernel')->getBundle(
$bundleName,
false
);

return $this->getContainer()->get('kernel')->getBundle($bundleName);
foreach ($bundles as $bundle) {
if ($bundle->getName() == $bundleName) {
return $bundle;
}
}
}
}

0 comments on commit 6957f44

Please sign in to comment.