Guten Tag
Hänge an einem sehr nervigen Problem.
Und zwar versuche ich ein Form Element auf meiner Website auszulesen:
<f:form method="post" object='{newEntry}' name='newEntry' action='submitForm' controller='Show'>
<f:form.textfield size="53" property='title'/>
<f:form.textarea rows="4" cols="40" property='bodytext'/>
<f:form.submit class="submit" value="Submit" />
</f:form>
/**
* action submitForm
*
* @param MyVendor\Bulletinboard\Domain\Model\Entry $newEntry
* @return void
*/
public function submitFormAction(MyVendor\Bulletinboard\Domain\Model\Entry $newEntry = NULL) {
if ($newEntry == NULL){
$newEntry = GeneralUtility::makeInstance('MyVendor\Bulletinboard\Domain\Model\Entry');
}
var_Dump($newEntry);
}
}
Doch newEntry bleibt Leer. Egal was ich mache. Sobalt ich das "= NULL" rausnehme, bekomme ich folgende Fehlermeldung:
Oops, an error occurred!
Too few arguments to function MyVendor\Bulletinboard\Controller\ShowController::submitFormAction(), 0 passed and exactly 1 expected
Ich hoffe ihr könnt mir da noch helfen, ich stehe gerade völlig auf dem Schlauch.
Danke Schonmal
Mfg
Power-Poler
Edit:
Typo3 7.6.22