/**
  * @test
  */
 public function setSelectedLanguagesSetsSelectedLanguages()
 {
     $languages = array('nl', 'de');
     $this->fixture->setSelectedLanguages($languages);
     $this->assertSame($languages, $this->fixture->getSelectedLanguages());
 }
예제 #2
0
 /**
  * Update translation(s)
  *
  * @param \TYPO3\CMS\Lang\Domain\Model\UpdateTranslationForm $form
  * @return void
  */
 public function updateTranslationAction(\TYPO3\CMS\Lang\Domain\Model\UpdateTranslationForm $form)
 {
     $result = array();
     try {
         if (count($form->getSelectedLanguages())) {
             foreach ($form->getExtensions() as $extension) {
                 $result[$extension] = $this->checkTranslationForExtension($form->getSelectedLanguages(), $extension);
             }
         }
     } catch (\Exception $exception) {
         $flashMessage = $this->objectManager->create('TYPO3\\CMS\\Core\\Messaging\\FlashMessage', htmlspecialchars($exception->getMessage()), '', \TYPO3\CMS\Core\Messaging\FlashMessage::ERROR);
         \TYPO3\CMS\Core\Messaging\FlashMessageQueue::addMessage($flashMessage);
     }
     $this->forward('index', NULL, NULL, array('updateResult' => $result));
 }