private $rssLimit;
private $language;
private $readingSpeed;
+ private $actionMarkAsRead;
+ private $listMode;
- public function __construct(EntityManager $em, $theme, $itemsOnPage, $rssLimit, $language, $readingSpeed)
+ public function __construct(EntityManager $em, $theme, $itemsOnPage, $rssLimit, $language, $readingSpeed, $actionMarkAsRead, $listMode)
{
$this->em = $em;
$this->theme = $theme;
$this->rssLimit = $rssLimit;
$this->language = $language;
$this->readingSpeed = $readingSpeed;
+ $this->actionMarkAsRead = $actionMarkAsRead;
+ $this->listMode = $listMode;
}
public static function getSubscribedEvents()
public function createConfig(UserEvent $event, $eventName = null, EventDispatcherInterface $eventDispatcher = null)
{
- if (!$event->getUser()->isEnabled()) {
- return;
- }
-
$config = new Config($event->getUser());
$config->setTheme($this->theme);
$config->setItemsPerPage($this->itemsOnPage);
$config->setRssLimit($this->rssLimit);
$config->setLanguage($this->language);
$config->setReadingSpeed($this->readingSpeed);
+ $config->setActionMarkAsRead($this->actionMarkAsRead);
+ $config->setListMode($this->listMode);
$this->em->persist($config);
$this->em->flush();