Files
gutachten_t3/packages/gutachten/Classes/DB/Insert/_InsertController.php
T

62 lines
1.2 KiB
PHP

<?php
namespace HermannTelser\Gutachten\DB\Insert;
use TYPO3\CMS\Core\Utility\GeneralUtility;
/***
*
* This file is part of the "NuhOdds Comparatore" 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) 2019 Hermann Telser <hermann.telser@gmail.com>, NUH-Odds GmbH
*
***/
class _InsertController
{
public function __construct()
{
$arr = [];
switch (GeneralUtility::_GP('action')) {
// Auftraggeber
case 'auftraggeber_neu':
AddAuftraggeber::add();
break;
// Gutachter
case 'gutachter_neu':
AddGutachter::add();
break;
// any table
case 'neues_projekt':
NewProjekt::create();
break;
case 'neues_merkmal':
AddMerkmal::create();
break;
case 'neues_element':
AddToTable::create();
break;
default:
Message::error(
__FILE__,
__LINE__,
'no controller switch defined'
);
}
if (null !== GeneralUtility::_GP('berechnen')) {
Berechnung::berechnen();
}
echo 1;
exit;
// header('Content-Type: application/json');
// echo json_encode($arr);
// exit();
}
}