Skip to content
Permalink
Browse files

Add error message when view doesn't exist. Fix translation strings (#…

  • Loading branch information...
LOBsTerr committed Apr 10, 2019
1 parent f7cf0fd commit fe650976f7dec8e723b5f245b45aeacb0488314d
Showing with 10 additions and 1 deletion.
  1. +10 −1 src/Command/Config/ExportViewCommand.php
@@ -153,6 +153,15 @@ protected function execute(InputInterface $input, OutputInterface $output)
$viewTypeName = $viewTypeDefinition->getConfigPrefix() . '.' . $viewId;
$viewNameConfig = $this->getConfiguration($viewTypeName);
if (empty($viewNameConfig)) {
$this->getIo()->error(
sprintf(
$this->trans('commands.config.export.view.messages.wrong-view'),
$viewId
)
);
return 0;
}
$this->configExport[$viewTypeName] = ['data' => $viewNameConfig, 'optional' => $optionalConfig];
@@ -168,6 +177,6 @@ protected function execute(InputInterface $input, OutputInterface $output)
}
}
$this->exportConfigToModule($module, $this->trans('commands.views.export.messages.view-exported'));
$this->exportConfigToModule($module, $this->trans('commands.config.export.view.messages.view-exported'));
}
}

0 comments on commit fe65097

Please sign in to comment.
You can’t perform that action at this time.