isAdmin()) { $this->registerAdminRoutes($venom); } return true; } public function init(): void { } private function registerAdminRoutes(Venom $venom) { $venom->getRouter(Router::ADMIN_ROUTER)->addRoutes([ '/pages' => [ 'cl' => PageModule::class, 'roles' => ['ROLE_ADMIN'], 'routes' => [ '*' => [ "GET" => 'get', ], '1' => [ "GET" => 'getById', "POST" => 'update', "PUT" => 'insert', ] ] ] ]); } public function get() { AdminHelper::sendResponse([ 'pages' => [ ['id' => 1, 'name' => 'Flamingos going wild!', 'icon' => 'vt-edit'], ['id' => 2, 'name' => 'Turbinen sind geil.', 'icon' => 'vt-edit'], ['id' => 3, 'name' => 'Aufbau und Umbau des neuen VENOMs Plugins', 'icon' => 'vt-edit'], ['id' => 4, 'name' => 'Aber Mama hat gesagt!', 'icon' => 'vt-edit'], ['id' => 5, 'name' => 'Frische Fische nur heute!', 'icon' => 'vt-edit'] ], ]); } public function update(): bool { return false; } public function insert(): bool { return false; } public function getById($id) { AdminHelper::sendResponse([ 'caseName' => 'ROLE_ADMIN', 'id' => $id, 'name' => 'Admin', 'icon' => 'vt-visibility', 'users' => [ ['value' => 1, 'name' => 'engineertrooper', 'icon' => 'vt-edit'], ['value' => 2, 'name' => 'versustunez', 'icon' => 'vt-edit'] ] ]); } }