30 lines
728 B
PHP
30 lines
728 B
PHP
<?php
|
|
|
|
namespace HermannTelser\Gutachten\DB\Delete;
|
|
|
|
use HermannTelser\Gutachten\Utility\Message;
|
|
use TYPO3\CMS\Core\Utility\GeneralUtility;
|
|
use HermannTelser\Gutachten\DB\DbFunction;
|
|
|
|
class DeleteProjekt
|
|
{
|
|
public static function delete()
|
|
{
|
|
if (null !== GeneralUtility::_GP('id')) {
|
|
|
|
$projekt_id = GeneralUtility::_GP('id');
|
|
|
|
DbFunction::delete('tx_gutachten_projekte', ['id' => $projekt_id]);
|
|
|
|
$_tables = ['tx_gutachten_freigabe','tx_gutachten_projekteplatzhalter','tx_gutachten_projektestandards','tx_gutachten_raume_all','tx_gutachten_raume_basis','tx_gutachten_raume_generell'];
|
|
|
|
foreach ($_tables as $key => $table) {
|
|
DbFunction::delete($table, ['pid' => $projekt_id]);
|
|
}
|
|
}
|
|
|
|
echo 1;
|
|
exit;
|
|
}
|
|
}
|