Bearsampp
2026.9.23
Toggle main menu visibility
Loading...
Searching...
No Matches
class.tpl.app.services.php
Go to the documentation of this file.
1
<?php
2
/*
3
* Copyright (c) 2021-2026 Bearsampp
4
* License: GNU General Public License version 3 or later; see LICENSE.txt
5
* Author: bear
6
* Website: https://bearsampp.com
7
* Github: https://github.com/Bearsampp
8
*/
9
17
class
TplAppServices
18
{
19
// Constants for action identifiers
20
const
ACTION_START
=
'startServices'
;
21
const
ACTION_STOP
=
'stopServices'
;
22
const
ACTION_RESTART
=
'restartServices'
;
23
31
public
static
function
process
()
32
{
33
global
$bearsamppLang
;
34
35
$tplStart =
TplApp::getActionMulti
(
36
self::ACTION_START,
37
null
,
38
array(
$bearsamppLang
->getValue(
Lang::MENU_START_SERVICES
),
TplAestan::GLYPH_SERVICES_START
),
39
false
,
40
get_called_class()
41
);
42
43
$tplStop =
TplApp::getActionMulti
(
44
self::ACTION_STOP,
45
null
,
46
array(
$bearsamppLang
->getValue(
Lang::MENU_STOP_SERVICES
),
TplAestan::GLYPH_SERVICES_STOP
),
47
false
,
48
get_called_class()
49
);
50
51
$tplRestart =
TplApp::getActionMulti
(
52
self::ACTION_RESTART,
53
null
,
54
array(
$bearsamppLang
->getValue(
Lang::MENU_RESTART_SERVICES
),
TplAestan::GLYPH_SERVICES_RESTART
),
55
false
,
56
get_called_class()
57
);
58
59
// Items
60
$items = $tplStart[
TplApp::SECTION_CALL
] . PHP_EOL .
61
$tplStop[
TplApp::SECTION_CALL
] . PHP_EOL .
62
$tplRestart[
TplApp::SECTION_CALL
] . PHP_EOL;
63
64
// Actions
65
$actions = PHP_EOL . $tplStart[
TplApp::SECTION_CONTENT
] .
66
PHP_EOL . $tplStop[
TplApp::SECTION_CONTENT
] .
67
PHP_EOL . $tplRestart[
TplApp::SECTION_CONTENT
];
68
69
return
array($items, $actions);
70
}
71
77
public
static
function
getActionStartServices
()
78
{
79
return
TplApp::getActionRun
(
Action::START_ALL_SERVICES
, array());
80
}
81
87
public
static
function
getActionStopServices
()
88
{
89
return
TplApp::getActionRun
(
Action::STOP_ALL_SERVICES
, array());
90
}
91
97
public
static
function
getActionRestartServices
()
98
{
99
return
TplApp::getActionRun
(
Action::RESTART_ALL_SERVICES
, array());
100
}
101
}
102
$bearsamppLang
global $bearsamppLang
Definition
ajax.apache.php:16
Action\STOP_ALL_SERVICES
const STOP_ALL_SERVICES
Definition
class.action.php:49
Action\START_ALL_SERVICES
const START_ALL_SERVICES
Definition
class.action.php:47
Action\RESTART_ALL_SERVICES
const RESTART_ALL_SERVICES
Definition
class.action.php:45
Lang\MENU_RESTART_SERVICES
const MENU_RESTART_SERVICES
Definition
class.lang.php:111
Lang\MENU_START_SERVICES
const MENU_START_SERVICES
Definition
class.lang.php:116
Lang\MENU_STOP_SERVICES
const MENU_STOP_SERVICES
Definition
class.lang.php:119
TplAestan\GLYPH_SERVICES_STOP
const GLYPH_SERVICES_STOP
Definition
class.tpl.aestan.php:69
TplAestan\GLYPH_SERVICES_RESTART
const GLYPH_SERVICES_RESTART
Definition
class.tpl.aestan.php:68
TplAestan\GLYPH_SERVICES_START
const GLYPH_SERVICES_START
Definition
class.tpl.aestan.php:70
TplApp\getActionMulti
static getActionMulti($action, $args=array(), $item=array(), $disabled=false, $class=false)
Definition
class.tpl.app.php:153
TplApp\getActionRun
static getActionRun($action, $args=array(), $item=array(), $waitUntilTerminated=true)
Definition
class.tpl.app.php:116
TplApp\SECTION_CALL
const SECTION_CALL
Definition
class.tpl.app.php:23
TplApp\SECTION_CONTENT
const SECTION_CONTENT
Definition
class.tpl.app.php:24
TplAppServices
Definition
class.tpl.app.services.php:18
TplAppServices\ACTION_RESTART
const ACTION_RESTART
Definition
class.tpl.app.services.php:22
TplAppServices\process
static process()
Definition
class.tpl.app.services.php:31
TplAppServices\getActionRestartServices
static getActionRestartServices()
Definition
class.tpl.app.services.php:97
TplAppServices\getActionStopServices
static getActionStopServices()
Definition
class.tpl.app.services.php:87
TplAppServices\getActionStartServices
static getActionStartServices()
Definition
class.tpl.app.services.php:77
TplAppServices\ACTION_START
const ACTION_START
Definition
class.tpl.app.services.php:20
TplAppServices\ACTION_STOP
const ACTION_STOP
Definition
class.tpl.app.services.php:21
sandbox
core
classes
tpls
app
class.tpl.app.services.php
Generated by
1.17.0