Hallo,
dieser Controller gibt mir die Fehlermeldung: Sorry, the requested view was not found.
The technical reason is: No template was found. View could not be resolved for action "new" in class "CovisionPDFWriter\Covisionpdfwriter\Controller\CovisionPDFFormController".
Wie kann ich die newAction configurieren?
Hier der Code
[code]<?php
namespace CovisionPDFWriter\Covisionpdfwriter\Controller;
/***
*
* This file is part of the "CovisionPDFWriter" Extension for TYPO3 CMS.
*
* For the full copyright and license information, please read the
* LICENSE.txt file that was distributed with this source code.
*
* (c) 2020 Anselmo Cotellessa <anselmo.cotellessa@covisionmedia.com>, Covisionmedia
*
***/
/**
* CovisionPDFFormController
*/
class CovisionPDFFormController extends \TYPO3\CMS\Extbase\Mvc\Controller\ActionController
{
/**
* action new
*
* @return void
*/
public function newAction(\CovisionPDFWriter\Covisionpdfwriter\Domain\Model\CovisionPDFForm $newAction = NULL)
{
$this->view->assign('newCovisionPDFForm', $newAction);
}
/**
* action create
*
* @param \CovisionPDFWriter\Covisionpdfwriter\Domain\Model\CovisionPDFForm $newCovisionPDFForm
* @return void
*/
public function createAction(\CovisionPDFWriter\Covisionpdfwriter\Domain\Model\CovisionPDFForm $newCovisionPDFForm)
{
$this->covisionPDFFormRepository->add($newCovisionPDFForm);
$this->redirect('list');
}
/**
* action edit
*
* @param \CovisionPDFWriter\Covisionpdfwriter\Domain\Model\CovisionPDFForm $covisionPDFForm
* @ignorevalidation $covisionPDFForm
* @return void
*/
public function editAction(\CovisionPDFWriter\Covisionpdfwriter\Domain\Model\CovisionPDFForm $covisionPDFForm)
{
$this->writePDF($covisionPDFForm);
}
/**
* action update
*
* @param \CovisionPDFWriter\Covisionpdfwriter\Domain\Model\CovisionPDFForm $covisionPDFForm
* @return void
*/
public function updateAction(\CovisionPDFWriter\Covisionpdfwriter\Domain\Model\CovisionPDFForm $covisionPDFForm)
{
$this->covisionPDFFormRepository->update($covisionPDFForm);
$this->redirect('list');
}
/**
* action delete
*
* @param \CovisionPDFWriter\Covisionpdfwriter\Domain\Model\CovisionPDFForm $covisionPDFForm
* @return void
*/
public function deleteAction(\CovisionPDFWriter\Covisionpdfwriter\Domain\Model\CovisionPDFForm $covisionPDFForm)
{
$this->covisionPDFFormRepository->remove($covisionPDFForm);
$this->redirect('list');
}
/**
* @param $formInputs
*/
public function writePDF($formInputs)
{
$pdf = new FPDF();
$pdf->AddPage();
$pdf->Output('I', 'filadmin/user_upload/test/test.pdf');
}
/**
* action list
*
* @return void
*/
public function listAction()
{
$covisionPDFForms = $this->covisionPDFFormRepository->findAll();
$this->view->assign('covisionPDFForms', $covisionPDFForms);
}
/**
* action show
*
* @param \CovisionPDFWriter\Covisionpdfwriter\Domain\Model\CovisionPDFForm $covisionPDFForm
* @return void
*/
public function showAction(\CovisionPDFWriter\Covisionpdfwriter\Domain\Model\CovisionPDFForm $covisionPDFForm)
{
$this->view->assign('covisionPDFForm', $covisionPDFForm);
}
}
[/code]