Exemplo n.º 1
0
 /**
  * Update the language selection form
  *
  * @param \TYPO3\CMS\Lang\Domain\Model\LanguageSelectionForm $languageSelectionForm
  * @return void
  * @ignorevalidation $languageSelectionForm
  */
 public function updateLanguageSelectionAction(\TYPO3\CMS\Lang\Domain\Model\LanguageSelectionForm $languageSelectionForm)
 {
     if ($languageSelectionForm !== NULL) {
         $this->languageRepository->updateSelectedLanguages($languageSelectionForm->getSelectedLanguages());
     }
     $this->redirect('index');
 }
Exemplo n.º 2
0
 /**
  * Save selected locale(s)
  *
  * @param \TYPO3\CMS\Lang\Domain\Model\LanguageSelectionForm $form
  * @return void
  */
 public function saveSelectedLocaleAction(\TYPO3\CMS\Lang\Domain\Model\LanguageSelectionForm $form)
 {
     $selectedLanguages = array();
     foreach ($form->getLocale() as $locale => $value) {
         if ($value) {
             $selectedLanguages[] = $locale;
         }
     }
     $this->languageRepository->updateSelectedLanguages($selectedLanguages);
     $this->forward('index');
 }