Bearsampp 2026.9.23
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
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,
39 false,
40 get_called_class()
41 );
42
43 $tplStop = TplApp::getActionMulti(
44 self::ACTION_STOP,
45 null,
47 false,
48 get_called_class()
49 );
50
51 $tplRestart = TplApp::getActionMulti(
52 self::ACTION_RESTART,
53 null,
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 {
80 }
81
87 public static function getActionStopServices()
88 {
90 }
91
97 public static function getActionRestartServices()
98 {
100 }
101}
102
global $bearsamppLang
const STOP_ALL_SERVICES
const START_ALL_SERVICES
const RESTART_ALL_SERVICES
const MENU_RESTART_SERVICES
const MENU_START_SERVICES
const MENU_STOP_SERVICES
const GLYPH_SERVICES_STOP
const GLYPH_SERVICES_RESTART
const GLYPH_SERVICES_START
static getActionMulti($action, $args=array(), $item=array(), $disabled=false, $class=false)
static getActionRun($action, $args=array(), $item=array(), $waitUntilTerminated=true)
const SECTION_CALL
const SECTION_CONTENT