mirror of
https://github.com/wallabag/wallabag.git
synced 2025-07-22 17:18:37 +00:00
Implement simple config
This commit is contained in:
parent
7a577c519f
commit
4d85d7e9ba
10 changed files with 347 additions and 156 deletions
|
@ -6,7 +6,7 @@ use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand;
|
|||
use Symfony\Component\Console\Input\InputInterface;
|
||||
use Symfony\Component\Console\Output\OutputInterface;
|
||||
use Wallabag\CoreBundle\Entity\User;
|
||||
use Wallabag\CoreBundle\Entity\UsersConfig;
|
||||
use Wallabag\CoreBundle\Entity\Config;
|
||||
|
||||
class InstallCommand extends ContainerAwareCommand
|
||||
{
|
||||
|
@ -135,21 +135,13 @@ class InstallCommand extends ContainerAwareCommand
|
|||
|
||||
$em->persist($user);
|
||||
|
||||
$pagerConfig = new UsersConfig();
|
||||
$pagerConfig->setUser($user);
|
||||
$pagerConfig->setName('pager');
|
||||
$pagerConfig->setValue(10);
|
||||
$config = new Config();
|
||||
$config->setUser($user);
|
||||
$config->setTheme('baggy');
|
||||
$config->setItemsPerPage(10);
|
||||
$config->setLanguage('en_US');
|
||||
|
||||
$em->persist($pagerConfig);
|
||||
|
||||
$languageConfig = new LanguageConfig();
|
||||
$languageConfig->setUser($user);
|
||||
$languageConfig->setName('language');
|
||||
$languageConfig->setValue('en_EN');
|
||||
|
||||
$em->persist($languageConfig);
|
||||
|
||||
$em->flush();
|
||||
$em->persist($config);
|
||||
}
|
||||
|
||||
protected function runCommand($command, InputInterface $input, OutputInterface $output)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue