added configurable view after login (#523)

This commit is contained in:
Kevin Papst
2019-01-29 02:15:12 +01:00
committed by GitHub
parent 67dab35b57
commit fe4c3c10d6
8 changed files with 144 additions and 6 deletions

View File

@@ -14,6 +14,7 @@ use App\Entity\UserPreference;
use App\Event\PrepareUserEvent;
use App\Event\UserPreferenceEvent;
use App\Form\Type\CalendarViewType;
use App\Form\Type\InitialViewType;
use App\Form\Type\LanguageType;
use App\Form\Type\SkinType;
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
@@ -124,6 +125,11 @@ class UserPreferenceSubscriber implements EventSubscriberInterface
->setName('calendar.initial_view')
->setValue(CalendarViewType::DEFAULT_VIEW)
->setType(CalendarViewType::class),
(new UserPreference())
->setName('login.initial_view')
->setValue(InitialViewType::DEFAULT_VIEW)
->setType(InitialViewType::class),
];
}