chore: Refactor EventDispatcher and observer pattern

Signed-off-by: Rubén D <nuxsmin@syspass.org>
This commit is contained in:
Rubén D
2023-11-03 12:15:48 +01:00
parent 0692487f37
commit dd43b9842f
218 changed files with 1070 additions and 931 deletions

View File

@@ -67,13 +67,13 @@ final class SaveCreateFromAccountController extends PublicLinkSaveBase
$this->publicLinkService->create($publicLinkData);
$this->eventDispatcher->notifyEvent('create.publicLink.account', new Event($this));
$this->eventDispatcher->notify('create.publicLink.account', new Event($this));
return $this->returnJsonResponse(JsonResponse::JSON_SUCCESS, __u('Link created'));
} catch (Exception $e) {
processException($e);
$this->eventDispatcher->notifyEvent('exception', new Event($e));
$this->eventDispatcher->notify('exception', new Event($e));
return $this->returnJsonResponseException($e);
}