From 62ec1d083d6d2975ab755b860f5dcd15218d1b5b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Patrick=20M=C3=BCller?= <p.mueller@pcsg.de>
Date: Wed, 20 Jul 2022 13:03:00 +0200
Subject: [PATCH] feat: onQuiqqerMenuIndependentDelete event

---
 src/QUI/Menu/Independent/Factory.php | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/QUI/Menu/Independent/Factory.php b/src/QUI/Menu/Independent/Factory.php
index 0d06b8b..3e717a4 100644
--- a/src/QUI/Menu/Independent/Factory.php
+++ b/src/QUI/Menu/Independent/Factory.php
@@ -41,5 +41,11 @@ public static function deleteMenu(int $menuId)
         QUI::getDataBase()->delete(Handler::table(), [
             'id' => $menuId
         ]);
+
+        try {
+            QUI::getEvents()->fireEvent('quiqqerMenuIndependentDelete', [$menuId]);
+        } catch (\Exception $Exception) {
+            QUI\System\Log::writeException($Exception);
+        }
     }
 }
-- 
GitLab