return 1;
}
} else {
- $users = $this->get('wallabag_user.user_repository')->findAll();
+ $users = $this->getContainer()->get('wallabag_user.user_repository')->findAll();
$output->writeln(sprintf('Cleaning through %d user accounts', count($users)));
private function cleanDuplicates(User $user)
{
$em = $this->getContainer()->get('doctrine.orm.entity_manager');
- $repo = $this->get('wallabag_core.entry_repository');
+ $repo = $this->getContainer()->get('wallabag_core.entry_repository');
$entries = $repo->getAllEntriesIdAndUrl($user->getId());
*/
private function getUser($username)
{
- return $this->get('wallabag_user.user_repository')->findOneByUserName($username);
+ return $this->getContainer()->get('wallabag_user.user_repository')->findOneByUserName($username);
}
private function getDoctrine()
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();
*/
private function getUser($username)
{
- return $this->get('wallabag_user.user_repository')->findOneByUserName($username);
+ return $this->getContainer()->get('wallabag_user.user_repository')->findOneByUserName($username);
}
private function getDoctrine()
*/
private function getUser($username)
{
- return $this->get('wallabag_user.user_repository')->findOneByUserName($username);
+ return $this->getContainer()->get('wallabag_user.user_repository')->findOneByUserName($username);
}
private function getDoctrine()
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
use Wallabag\CoreBundle\Entity\Entry;
-use Wallabag\CoreBundle\Entity\Tag;
/**
* The try/catch can be removed once all formats will be implemented.