/** * Set the fluid partial path to the element * * @return void */ public function setVisibility() { $visibility = false; if ($this->formBuilder->getControllerAction() === 'show') { if (!isset($this->userConfiguredElementTyposcript['visibleInShowAction'])) { $visibility = (bool) $this->typoScriptRepository->getModelConfigurationByScope($this->element->getElementType(), 'visibleInShowAction'); } else { $visibility = (bool) $this->userConfiguredElementTyposcript['visibleInShowAction']; } } elseif ($this->formBuilder->getControllerAction() === 'confirmation') { if (!isset($this->userConfiguredElementTyposcript['visibleInConfirmationAction'])) { $visibility = (bool) $this->typoScriptRepository->getModelConfigurationByScope($this->element->getElementType(), 'visibleInConfirmationAction'); } else { $visibility = (bool) $this->userConfiguredElementTyposcript['visibleInConfirmationAction']; } } elseif ($this->formBuilder->getControllerAction() === 'process') { if (!isset($this->userConfiguredElementTyposcript['visibleInMail'])) { $visibility = (bool) $this->typoScriptRepository->getModelConfigurationByScope($this->element->getElementType(), 'visibleInMail'); } else { $visibility = (bool) $this->userConfiguredElementTyposcript['visibleInMail']; } } $this->element->setShowElement($visibility); }