/** * Revive the domain model of the accordant element. * * @param Element $element * @param array $userConfiguredElementTypoScript The configuration array * @param string $elementType The element type (e.g BUTTON) * @return void */ protected function reviveElement(Element $element, array $userConfiguredElementTypoScript, $elementType = '') { // @todo Check $userConfiguredElementTypoScript if ($elementType === 'IMAGEBUTTON') { GeneralUtility::deprecationLog('EXT:form: The element IMAGEBUTTON is deprecated since TYPO3 CMS 7, will be removed with TYPO3 CMS 8.'); } $element->setElementType($elementType); $element->setElementCounter($this->elementCounter->getElementId()); $elementBuilder = ElementBuilder::create($this, $element, $userConfiguredElementTypoScript); $elementBuilder->setPartialPaths(); $elementBuilder->setVisibility(); if ($element->getElementType() == 'CONTENTELEMENT') { $attributeValue = ''; if ($this->configuration->getContentElementRendering()) { $attributeValue = $this->formUtility->renderItem($userConfiguredElementTypoScript['cObj.'], $userConfiguredElementTypoScript['cObj']); } $element->setAdditionalArguments(array('content' => $attributeValue)); } else { $this->setAttributes($elementBuilder, $element, $userConfiguredElementTypoScript); $userConfiguredElementTypoScript = $elementBuilder->getUserConfiguredElementTypoScript(); $this->setValidationMessages($element); $this->signalSlotDispatcher->dispatch(__CLASS__, 'txFormAfterElementCreation', array($element, $this)); // create all child elements $this->setChildElementsByIntegerKey($element, $userConfiguredElementTypoScript); } }
/** * Handles confirmation action, presenting the user submitted * data again for final confirmation. * * @param \TYPO3\CMS\Form\Domain\Model\ValidationElement $model * @return void */ public function confirmationAction(ValidationElement $model) { $this->skipForeignFormProcessing(); if (count($model->getIncomingFields()) === 0) { $this->sessionUtility->destroySession(); $this->forward('show'); } $this->controllerContext->setValidationElement($model); $form = $this->formBuilder->buildModel(); // store uploaded files $this->sessionUtility->storeSession(); $this->view->assign('model', $form); $message = $this->formUtility->renderItem($this->typoscript['confirmation.']['message.'], $this->typoscript['confirmation.']['message'], LocalizationUtility::translate('tx_form_view_confirmation.message', 'form')); $this->view->assign('message', $message); }
/** * Render the processor message * * @param string $messageType * @return string */ protected function renderMessage($messageType) { return $this->formUtility->renderItem($this->typoScript['messages.'][$messageType . '.'], $this->typoScript['messages.'][$messageType], $this->getLocalLanguageLabel($messageType)); }
/** * Set the message, like 'required' for the validation rule * and substitutes markers for values, like %maximum * * * @param mixed $message Message as string or TS * @param NULL|string $type Name of the cObj * @param string $messageType message or error * @return string */ public function renderMessage($message = null, $type = null, $messageType = 'message') { $message = $this->formUtility->renderItem($message, $type, $this->getLocalLanguageLabel($messageType)); return $this->substituteMarkers($message); }