Update hook handling

This commit is contained in:
Dennis Eichhorn 2018-12-01 22:25:38 +01:00
parent a02fef96e8
commit 2814932cb7
2 changed files with 49 additions and 4 deletions

View File

@ -1,7 +1,13 @@
<?php
return [
'PRE:Module:.*?\-create' => '\Modules\Auditor\Controller\ApiController:apiLogCreate',
'PRE:Module:.*?\-update' => '\Modules\Auditor\Controller\ApiController:apiLogUpdate',
'PRE:Module:.*?\-delete' => '\Modules\Auditor\Controller\ApiController:apiLogDelete',
'PRE:Module:.*?\-create' => [
'callback' => ['\Modules\Auditor\Controller\ApiController:apiLogCreate'],
],
'PRE:Module:.*?\-update' => [
'callback' => ['\Modules\Auditor\Controller\ApiController:apiLogUpdate'],
],
'PRE:Module:.*?\-delete' => [
'callback' => ['\Modules\Auditor\Controller\ApiController:apiLogDelete'],
],
];

View File

@ -20,9 +20,48 @@ use phpOMS\Message\ResponseAbstract;
use phpOMS\Message\NotificationLevel;
use phpOMS\Module\ModuleAbstract;
use phpOMS\Views\View;
use phpOMS\Account\Account;
use phpOMS\Account\PermissionType;
use phpOMS\DataStorage\Database\RelationType;
final class ApiController extends Controller
{
}
public function apiLogCreate(
Account $account,
$old,
$new,
int $type = 0,
int $subtype = 0,
string $module = null,
string $content = null
) : void
{
}
public function apiLogUpdate(
Account $account,
$old,
$new,
int $type = 0,
int $subtype = 0,
string $module = null,
string $content = null
) : void
{
}
public function apiLogDelete(
Account $account,
$old,
$new,
int $type = 0,
int $subtype = 0,
string $module = null,
string $content = null
) : void
{
}
}