Inital commit
This commit is contained in:
@@ -14,6 +14,7 @@ namespace Thelia\Command;
|
||||
|
||||
use Symfony\Component\Console\Input\InputInterface;
|
||||
use Symfony\Component\Console\Output\OutputInterface;
|
||||
use Thelia\Exception\InvalidModuleException;
|
||||
use Thelia\Module\ModuleManagement;
|
||||
|
||||
/**
|
||||
@@ -36,13 +37,20 @@ class ModuleRefreshCommand extends ContainerAwareCommand
|
||||
{
|
||||
try {
|
||||
$moduleManagement = new ModuleManagement;
|
||||
$moduleManagement->updateModules();
|
||||
$moduleManagement->updateModules($this->getContainer());
|
||||
} catch (InvalidModuleException $ime) {
|
||||
throw new \RuntimeException(
|
||||
sprintf('One or more modules could not be refreshed : %s', $ime->getErrorsAsString("\n"))
|
||||
);
|
||||
} catch (\Exception $e) {
|
||||
throw new \RuntimeException(sprintf('Refresh modules list fail with Exception : [%d] %s', $e->getCode(), $e->getMessage()));
|
||||
throw new \RuntimeException(
|
||||
sprintf('Refresh modules list fail with Exception : [%d] %s', $e->getCode(), $e->getMessage())
|
||||
);
|
||||
}
|
||||
|
||||
if (method_exists($output, 'renderBlock')) {
|
||||
$output->renderBlock([
|
||||
$output->renderBlock(
|
||||
[
|
||||
'',
|
||||
'Modules list successfully refreshed',
|
||||
''
|
||||
|
||||
Reference in New Issue
Block a user