configure first day of week for calendar and date-picker (#1952)

This commit is contained in:
Kevin Papst
2020-09-05 18:31:37 +02:00
committed by GitHub
parent ed528eb19a
commit 217960de60
30 changed files with 195 additions and 71 deletions

View File

@@ -15,6 +15,7 @@ use App\Entity\UserPreference;
use App\Event\PrepareUserEvent;
use App\Event\UserPreferenceEvent;
use App\Form\Type\CalendarViewType;
use App\Form\Type\FirstWeekDayType;
use App\Form\Type\InitialViewType;
use App\Form\Type\LanguageType;
use App\Form\Type\SkinType;
@@ -126,10 +127,17 @@ class UserPreferenceSubscriber implements EventSubscriberInterface
(new UserPreference())
->setName(UserPreference::LOCALE)
->setValue($this->getDefaultLanguage())
->setOrder(300)
->setOrder(250)
->setSection('locale')
->setType(LanguageType::class),
(new UserPreference())
->setName(UserPreference::FIRST_WEEKDAY)
->setValue(User::DEFAULT_FIRST_WEEKDAY)
->setOrder(300)
->setSection('locale')
->setType(FirstWeekDayType::class),
(new UserPreference())
->setName(UserPreference::SKIN)
->setValue($this->getDefaultTheme())