diff options
author | Jeremy <jeremy.benoist@gmail.com> | 2015-02-16 21:28:49 +0100 |
---|---|---|
committer | Jeremy <jeremy.benoist@gmail.com> | 2015-02-16 21:31:58 +0100 |
commit | 4d85d7e9ba676bd5ac3428976ce9227f460eb542 (patch) | |
tree | acf77c5baced69e689fcfc2d9463a9b75b9b3657 /src/Wallabag/CoreBundle/Command/InstallCommand.php | |
parent | 7a577c519ffc254b6ddecd75c9ee84f656d759e1 (diff) | |
download | wallabag-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.php | 22 |
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; | |||
6 | use Symfony\Component\Console\Input\InputInterface; | 6 | use Symfony\Component\Console\Input\InputInterface; |
7 | use Symfony\Component\Console\Output\OutputInterface; | 7 | use Symfony\Component\Console\Output\OutputInterface; |
8 | use Wallabag\CoreBundle\Entity\User; | 8 | use Wallabag\CoreBundle\Entity\User; |
9 | use Wallabag\CoreBundle\Entity\UsersConfig; | 9 | use Wallabag\CoreBundle\Entity\Config; |
10 | 10 | ||
11 | class InstallCommand extends ContainerAwareCommand | 11 | class 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) |