forked from cmb69/realblog_xh
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathadmin.php
64 lines (56 loc) · 1.98 KB
/
admin.php
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
<?php
/**
* Copyright 2006-2010 Jan Kanters
* Copyright 2010-2014 Gert Ebersbach
* Copyright 2014-2023 Christoph M. Becker
*
* This file is part of Realblog_XH.
*
* Realblog_XH is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Realblog_XH is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Realblog_XH. If not, see <http://www.gnu.org/licenses/>.
*/
namespace Realblog;
use Realblog\Infra\Request;
use Realblog\Infra\Responder;
/**
* @var array<string,array<string,string>> $plugin_tx
* @var string $admin
* @var string $action
* @var string $o
*/
$temp = [
"heading" => $plugin_tx["realblog"]["exchange_heading"],
"url" => Request::current()->url()->withPage("realblog")->with("admin", "data_exchange")->relative(),
];
XH_registerStandardPluginMenuItems(true);
XH_registerPluginMenuItem("realblog", $temp["heading"], $temp["url"]);
if (XH_wantsPluginAdministration("realblog")) {
$o .= print_plugin_admin("on");
pluginMenu("ROW");
pluginMenu("TAB", XH_hsc($temp["url"]), "", $temp["heading"]);
$o .= pluginMenu("SHOW");
switch ($admin) {
case "":
$o .= Responder::respond(Dic::makeInfoController()(Request::current()));
break;
case "plugin_main":
$o .= Responder::respond(Dic::makeMainAdminController()(Request::current()));
break;
case "data_exchange":
$o .= Responder::respond(Dic::makeDataExchangeController()(Request::current()));
break;
default:
$o .= plugin_admin_common();
}
}
$temp = null;