Bearsampp
2026.7.11
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-2024 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,
null
,
37
array(
$bearsamppLang
->getValue(
Lang::MENU_START_SERVICES
),
TplAestan::GLYPH_SERVICES_START
),
38
false
, get_called_class()
39
);
40
41
$tplStop =
TplApp::getActionMulti
(
42
self::ACTION_STOP,
null
,
43
array(
$bearsamppLang
->getValue(
Lang::MENU_STOP_SERVICES
),
TplAestan::GLYPH_SERVICES_STOP
),
44
false
, get_called_class()
45
);
46
47
$tplRestart =
TplApp::getActionMulti
(
48
self::ACTION_RESTART,
null
,
49
array(
$bearsamppLang
->getValue(
Lang::MENU_RESTART_SERVICES
),
TplAestan::GLYPH_SERVICES_RESTART
),
50
false
, get_called_class()
51
);
52
53
// Items
54
$items = $tplStart[
TplApp::SECTION_CALL
] . PHP_EOL .
55
$tplStop[
TplApp::SECTION_CALL
] . PHP_EOL .
56
$tplRestart[
TplApp::SECTION_CALL
] . PHP_EOL;
57
58
// Actions
59
$actions = PHP_EOL . $tplStart[
TplApp::SECTION_CONTENT
] .
60
PHP_EOL . $tplStop[
TplApp::SECTION_CONTENT
] .
61
PHP_EOL . $tplRestart[
TplApp::SECTION_CONTENT
];
62
63
return
array($items, $actions);
64
}
65
71
public
static
function
getActionStartServices
()
72
{
73
return
TplApp::getActionRun
(
Action::START_ALL_SERVICES
, array());
74
}
75
81
public
static
function
getActionStopServices
()
82
{
83
return
TplApp::getActionRun
(
Action::STOP_ALL_SERVICES
, array());
84
}
85
91
public
static
function
getActionRestartServices
()
92
{
93
return
TplApp::getActionRun
(
Action::RESTART_ALL_SERVICES
, array());
94
}
95
}
96
$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:112
Lang\MENU_START_SERVICES
const MENU_START_SERVICES
Definition
class.lang.php:117
Lang\MENU_STOP_SERVICES
const MENU_STOP_SERVICES
Definition
class.lang.php:120
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:152
TplApp\getActionRun
static getActionRun($action, $args=array(), $item=array(), $waitUntilTerminated=true)
Definition
class.tpl.app.php:115
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:91
TplAppServices\getActionStopServices
static getActionStopServices()
Definition
class.tpl.app.services.php:81
TplAppServices\getActionStartServices
static getActionStartServices()
Definition
class.tpl.app.services.php:71
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