67 $this->requestHandler = $this->typoscriptFactory->setRequestHandler($typoscript);
68 $this->validate = $this->typoscriptFactory->setRules($typoscript);
89 public function cObjGetSingleExt($typoScriptObjectName, array $typoScript, $typoScriptKey, \
TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer $contentObject) {
91 if ($typoScriptObjectName ===
'FORM' && !empty($typoScript[
'useDefaultContentObject'])) {
92 $content = $contentObject->getContentObject($typoScriptObjectName)->render($typoScript);
93 } elseif ($typoScriptObjectName ===
'FORM') {
94 if ($contentObject->data[
'CType'] ===
'mailform') {
95 $bodytext = $contentObject->data[
'bodytext'];
98 $typoScriptParser->parse($bodytext);
99 $mergedTypoScript = (array)$typoScriptParser->setup;
100 \
TYPO3\CMS\Core\Utility\ArrayUtility::mergeRecursiveWithOverrule($mergedTypoScript, (array)$typoScript);
104 $newTypoScript = array(
106 '10.' => is_array($mergedTypoScript) ? $mergedTypoScript : $typoScript,
108 $content = $contentObject->COBJ_ARRAY($newTypoScript,
'INT');
110 if (isset($typoScript[
'stdWrap.'])) {
111 $content = $contentObject->stdWrap($content, $typoScript[
'stdWrap.']);
113 } elseif ($typoScriptObjectName ===
'FORM_INT') {
128 $content = $this->renderForm();
130 $content = $this->renderConfirmation();
132 $content = $this->doPostProcessing();
148 $submittedByPrefix = $this->requestHandler->getByMethod();
150 $submittedByPrefix === NULL ||
151 !empty($submittedByPrefix) && !$this->validate->isValid() ||
152 !empty($submittedByPrefix) && $this->validate->isValid() &&
153 $this->requestHandler->getPost(
'confirmation-false', NULL) !== NULL
165 protected function renderForm() {
166 $layout = $this->typoscriptFactory->getLayoutFromTypoScript($this->typoscript[
'form.']);
167 $this->layoutHandler->setLayout($layout);
168 $this->requestHandler->destroySession();
170 $form = $this->typoscriptFactory->buildModelFromTyposcript($this->typoscript);
188 if (isset($this->typoscript[
'confirmation']) && $this->typoscript[
'confirmation'] == 1 && $this->requestHandler->getPost(
'confirmation-true', NULL) === NULL) {
201 protected function renderConfirmation() {
202 $confirmationTyposcript = array();
203 if (isset($this->typoscript[
'confirmation.'])) {
204 $confirmationTyposcript = $this->typoscript[
'confirmation.'];
207 $layout = $this->typoscriptFactory->getLayoutFromTypoScript($confirmationTyposcript);
208 $form = $this->typoscriptFactory->buildModelFromTyposcript($this->typoscript);
210 $this->layoutHandler->setLayout($layout);
211 $this->requestHandler->storeSession();
224 protected function doPostProcessing() {
225 $form = $this->typoscriptFactory->buildModelFromTyposcript($this->typoscript);
226 $postProcessorTypoScript = array();
227 if (isset($this->typoscript[
'postProcessor.'])) {
228 $postProcessorTypoScript = $this->typoscript[
'postProcessor.'];
232 $content = $postProcessor->process();
233 $this->requestHandler->destroySession();
const PROPERTY_DisableContentElement
static makeInstance($className)