aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/UserBundle
diff options
context:
space:
mode:
authorJeremy Benoist <jeremy.benoist@gmail.com>2016-12-12 17:41:03 +0100
committerJeremy Benoist <jeremy.benoist@gmail.com>2016-12-12 17:41:03 +0100
commit24879db1f73c85b121702ba8c6ea36bae285c7c3 (patch)
tree9caa9e59d581ea0be79193635683bac5f1065438 /src/Wallabag/UserBundle
parent2c1eed8051160499d40ed033c83dd003c81b371e (diff)
downloadwallabag-24879db1f73c85b121702ba8c6ea36bae285c7c3.tar.gz
wallabag-24879db1f73c85b121702ba8c6ea36bae285c7c3.tar.zst
wallabag-24879db1f73c85b121702ba8c6ea36bae285c7c3.zip
Add default value for list_mode
Diffstat (limited to 'src/Wallabag/UserBundle')
-rw-r--r--src/Wallabag/UserBundle/EventListener/CreateConfigListener.php8
-rw-r--r--src/Wallabag/UserBundle/Resources/config/services.yml2
2 files changed, 9 insertions, 1 deletions
diff --git a/src/Wallabag/UserBundle/EventListener/CreateConfigListener.php b/src/Wallabag/UserBundle/EventListener/CreateConfigListener.php
index 8e2f04e9..0bdd1cae 100644
--- a/src/Wallabag/UserBundle/EventListener/CreateConfigListener.php
+++ b/src/Wallabag/UserBundle/EventListener/CreateConfigListener.php
@@ -21,8 +21,10 @@ class CreateConfigListener implements EventSubscriberInterface
21 private $rssLimit; 21 private $rssLimit;
22 private $language; 22 private $language;
23 private $readingSpeed; 23 private $readingSpeed;
24 private $actionMarkAsRead;
25 private $listMode;
24 26
25 public function __construct(EntityManager $em, $theme, $itemsOnPage, $rssLimit, $language, $readingSpeed) 27 public function __construct(EntityManager $em, $theme, $itemsOnPage, $rssLimit, $language, $readingSpeed, $actionMarkAsRead, $listMode)
26 { 28 {
27 $this->em = $em; 29 $this->em = $em;
28 $this->theme = $theme; 30 $this->theme = $theme;
@@ -30,6 +32,8 @@ class CreateConfigListener implements EventSubscriberInterface
30 $this->rssLimit = $rssLimit; 32 $this->rssLimit = $rssLimit;
31 $this->language = $language; 33 $this->language = $language;
32 $this->readingSpeed = $readingSpeed; 34 $this->readingSpeed = $readingSpeed;
35 $this->actionMarkAsRead = $actionMarkAsRead;
36 $this->listMode = $listMode;
33 } 37 }
34 38
35 public static function getSubscribedEvents() 39 public static function getSubscribedEvents()
@@ -51,6 +55,8 @@ class CreateConfigListener implements EventSubscriberInterface
51 $config->setRssLimit($this->rssLimit); 55 $config->setRssLimit($this->rssLimit);
52 $config->setLanguage($this->language); 56 $config->setLanguage($this->language);
53 $config->setReadingSpeed($this->readingSpeed); 57 $config->setReadingSpeed($this->readingSpeed);
58 $config->setActionMarkAsRead($this->actionMarkAsRead);
59 $config->setListMode($this->listMode);
54 60
55 $this->em->persist($config); 61 $this->em->persist($config);
56 $this->em->flush(); 62 $this->em->flush();
diff --git a/src/Wallabag/UserBundle/Resources/config/services.yml b/src/Wallabag/UserBundle/Resources/config/services.yml
index 164a25ec..72f6f12c 100644
--- a/src/Wallabag/UserBundle/Resources/config/services.yml
+++ b/src/Wallabag/UserBundle/Resources/config/services.yml
@@ -31,5 +31,7 @@ services:
31 - "%wallabag_core.rss_limit%" 31 - "%wallabag_core.rss_limit%"
32 - "%wallabag_core.language%" 32 - "%wallabag_core.language%"
33 - "%wallabag_core.reading_speed%" 33 - "%wallabag_core.reading_speed%"
34 - "%wallabag_core.action_mark_as_read%"
35 - "%wallabag_core.list_mode%"
34 tags: 36 tags:
35 - { name: kernel.event_subscriber } 37 - { name: kernel.event_subscriber }