/** * Executes this finisher * @see AbstractFinisher::execute() * * @return void * @throws \TYPO3\Form\Exception\FinisherException */ protected function executeInternal() { $formValues = $this->finisherContext->getFormValues(); $formNode = $this->formRegistry->getFormNode($this->finisherContext->getFormRuntime()->getIdentifier()); $slug = uniqid('post'); $postNode = $formNode->getParent()->createNode($slug, $this->nodeTypeManager->getNodeType('Lelesys.Plugin.ContactForm:FormPost')); foreach ($formValues as $propertyName => $value) { $postNode->setProperty($propertyName, $value); } $postNode->setProperty('postDateTime', time()); }
/** * * @return type */ public function evaluate() { $context = $this->getTsRuntime()->getCurrentContext(); $this->formRegistry->setFormNode($this->getFormIdentifier(), $context['node']); return parent::evaluate(); }