Skip to content
Code-Schnipsel Gruppen Projekte
Commit c317176d erstellt von Patrick Müller's avatar Patrick Müller
Dateien durchsuchen

Merge branch 'dev'

Übergeordnete 15df0cb0 f0106c7f
Keine zugehörigen Branchen gefunden
Keine zugehörigen Tags gefunden
2 Merge Requests!19Dev,!18Feat menu manager improvement
...@@ -25,7 +25,15 @@ public static function createMenu(): Menu ...@@ -25,7 +25,15 @@ public static function createMenu(): Menu
$lastId = QUI::getPDO()->lastInsertId(); $lastId = QUI::getPDO()->lastInsertId();
return Handler::getMenu($lastId); $Menu = Handler::getMenu($lastId);
try {
QUI::getEvents()->fireEvent('quiqqerMenuIndependentCreate', [$Menu]);
} catch (\Exception $Exception) {
QUI\System\Log::writeException($Exception);
}
return $Menu;
} }
/** /**
......
...@@ -20,12 +20,12 @@ ...@@ -20,12 +20,12 @@
*/ */
class Menu class Menu
{ {
protected int $id; protected int $id;
protected ?array $title = null; protected ?array $title = null;
protected ?array $workingTitle = null; protected ?array $workingTitle = null;
protected array $data = []; protected array $data = [];
protected array $children = []; protected array $children = [];
protected int $currentChildId = 0; protected int $currentChildId = 0;
/** /**
* @param int|array $menuId - menu id or menu data * @param int|array $menuId - menu id or menu data
...@@ -254,6 +254,12 @@ public function save(?QUI\Interfaces\Users\User $PermissionUser = null) ...@@ -254,6 +254,12 @@ public function save(?QUI\Interfaces\Users\User $PermissionUser = null)
], [ ], [
'id' => $this->getId() 'id' => $this->getId()
]); ]);
try {
QUI::getEvents()->fireEvent('quiqqerMenuIndependentSave', [$this]);
} catch (\Exception $Exception) {
QUI\System\Log::writeException($Exception);
}
} }
/** /**
......
0% Lade oder .
You are about to add 0 people to the discussion. Proceed with caution.
Bearbeitung dieser Nachricht zuerst beenden!
Bitte registrieren oder zum Kommentieren