/** * @test */ public function setExtensionsSetsExtensions() { $extensions = array(1 => 'about', 2 => 'aboutmodules', 3 => 'adodb'); $this->fixture->setExtensions($extensions); $this->assertSame($extensions, $this->fixture->getExtensions()); }
/** * 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)); }