forked from wallabag/wallabag
Fix getContainer in command
This commit is contained in:
@ -32,14 +32,14 @@ class ExportCommand extends ContainerAwareCommand
|
||||
protected function execute(InputInterface $input, OutputInterface $output)
|
||||
{
|
||||
try {
|
||||
$user = $this->get('wallabag_user.user_repository')->findOneByUserName($input->getArgument('username'));
|
||||
$user = $this->getContainer()->get('wallabag_user.user_repository')->findOneByUserName($input->getArgument('username'));
|
||||
} catch (NoResultException $e) {
|
||||
$output->writeln(sprintf('<error>User "%s" not found.</error>', $input->getArgument('username')));
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
$entries = $this->get('wallabag_core.entry_repository')
|
||||
$entries = $this->getContainer()->get('wallabag_core.entry_repository')
|
||||
->getBuilderForAllByUser($user->getId())
|
||||
->getQuery()
|
||||
->getResult();
|
||||
|
||||
Reference in New Issue
Block a user