示例#1
0
 /**
  * @test
  */
 public function processUsesLocalLayoutIfSet()
 {
     $processorConfig = array('layout.' => array('label' => '<div class="local"><labelvalue /></div>'), 'recipientEmail' => '*****@*****.**', 'senderEmail' => '*****@*****.**');
     $typoScript = array('layout.' => array('label' => '<div class="global"><labelvalue /></div>'), '1' => 'foo', '1.' => $processorConfig);
     $subject = new PostProcessor($this->formProphecy->reveal(), $typoScript);
     $this->typoScriptFactoryProphecy->setLayoutHandler($processorConfig)->willReturn($this->typoScriptLayoutProphecy->reveal());
     $this->assertEquals('', $subject->process());
 }
示例#2
0
 /**
  * Render the confirmation screen
  *
  * Stores the submitted data in a session
  *
  * @return string The confirmation screen HTML
  */
 protected function renderConfirmation()
 {
     $confirmationTyposcript = array();
     if (isset($this->typoscript['confirmation.'])) {
         $confirmationTyposcript = $this->typoscript['confirmation.'];
     }
     $layout = $this->typoscriptFactory->getLayoutFromTypoScript($confirmationTyposcript);
     $form = $this->typoscriptFactory->buildModelFromTyposcript($this->typoscript);
     $this->layoutHandler->setLayout($layout);
     $this->requestHandler->storeSession();
     /** @var $view \TYPO3\CMS\Form\View\Confirmation\ConfirmationView */
     $view = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Form\\View\\Confirmation\\ConfirmationView', $form, $confirmationTyposcript);
     return $view->get();
 }