-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path_routes.php
More file actions
45 lines (35 loc) · 1.25 KB
/
Copy path_routes.php
File metadata and controls
45 lines (35 loc) · 1.25 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
<?php
/**
* This file is part of Galette Legal Notices plugin (https://galette-plugins.github.io/plugin-legalnotices).
* SPDX-FileCopyrightText: Copyright © 2025-2026 The Galette Team
* SPDX-License-Identifier: GPL-3.0-or-later
*/
declare(strict_types=1);
use Galette\Middleware\Authenticate;
use GaletteLegalNotices\Controllers\MainController;
//Constants and classes from plugin
require_once $module['root'] . '/_config.inc.php';
$app->get(
'/settings',
[MainController::class, 'settings']
)->setName('legalnotices_settings')->add(Authenticate::class);
$app->post(
'/settings',
[MainController::class, 'storeSettings']
)->setName('legalnotices_store_settings')->add(Authenticate::class);
$app->get(
'/pages[/{lang}/{name}]',
[MainController::class, 'listPages']
)->setName('legalnotices_pages')->add(Authenticate::class);
$app->post(
'/pages/change',
[MainController::class, 'changePage']
)->setName('legalnotices_page_change')->add(Authenticate::class);
$app->post(
'/pages',
[MainController::class, 'editPage']
)->setName('legalnotices_page_edit')->add(Authenticate::class);
$app->get(
'/{name:legal-information|terms-of-service|privacy-policy}',
[MainController::class, 'viewPage']
)->setName('legalnotices_page');