aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/CoreBundle/Command/InstallCommand.php
diff options
context:
space:
mode:
authorJeremy <jeremy.benoist@gmail.com>2015-02-16 21:28:49 +0100
committerJeremy <jeremy.benoist@gmail.com>2015-02-16 21:31:58 +0100
commit4d85d7e9ba676bd5ac3428976ce9227f460eb542 (patch)
treeacf77c5baced69e689fcfc2d9463a9b75b9b3657 /src/Wallabag/CoreBundle/Command/InstallCommand.php
parent7a577c519ffc254b6ddecd75c9ee84f656d759e1 (diff)
downloadwallabag-4d85d7e9ba676bd5ac3428976ce9227f460eb542.tar.gz
wallabag-4d85d7e9ba676bd5ac3428976ce9227f460eb542.tar.zst
wallabag-4d85d7e9ba676bd5ac3428976ce9227f460eb542.zip
Implement simple config
Diffstat (limited to 'src/Wallabag/CoreBundle/Command/InstallCommand.php')
-rw-r--r--src/Wallabag/CoreBundle/Command/InstallCommand.php22
1 files changed, 7 insertions, 15 deletions
diff --git a/src/Wallabag/CoreBundle/Command/InstallCommand.php b/src/Wallabag/CoreBundle/Command/InstallCommand.php
index bf2f747d..a4301958 100644
--- a/src/Wallabag/CoreBundle/Command/InstallCommand.php
+++ b/src/Wallabag/CoreBundle/Command/InstallCommand.php
@@ -6,7 +6,7 @@ use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand;
6use Symfony\Component\Console\Input\InputInterface; 6use Symfony\Component\Console\Input\InputInterface;
7use Symfony\Component\Console\Output\OutputInterface; 7use Symfony\Component\Console\Output\OutputInterface;
8use Wallabag\CoreBundle\Entity\User; 8use Wallabag\CoreBundle\Entity\User;
9use Wallabag\CoreBundle\Entity\UsersConfig; 9use Wallabag\CoreBundle\Entity\Config;
10 10
11class InstallCommand extends ContainerAwareCommand 11class InstallCommand extends ContainerAwareCommand
12{ 12{
@@ -135,21 +135,13 @@ class InstallCommand extends ContainerAwareCommand
135 135
136 $em->persist($user); 136 $em->persist($user);
137 137
138 $pagerConfig = new UsersConfig(); 138 $config = new Config();
139 $pagerConfig->setUser($user); 139 $config->setUser($user);
140 $pagerConfig->setName('pager'); 140 $config->setTheme('baggy');
141 $pagerConfig->setValue(10); 141 $config->setItemsPerPage(10);
142 $config->setLanguage('en_US');
142 143
143 $em->persist($pagerConfig); 144 $em->persist($config);
144
145 $languageConfig = new LanguageConfig();
146 $languageConfig->setUser($user);
147 $languageConfig->setName('language');
148 $languageConfig->setValue('en_EN');
149
150 $em->persist($languageConfig);
151
152 $em->flush();
153 } 145 }
154 146
155 protected function runCommand($command, InputInterface $input, OutputInterface $output) 147 protected function runCommand($command, InputInterface $input, OutputInterface $output)