2024.8.23
|
Static Public Member Functions | |
static | getActionStatus ($status) |
static | process () |
Data Fields | |
const | ACTION = 'status' |
Class TplAppOnline
This class provides methods to handle the online/offline status of the Bearsampp application. It includes functionalities for generating actions and menu items to switch the application between online and offline states.
Definition at line 17 of file class.tpl.app.online.php.
|
static |
Generates the action string to switch the online/offline status.
This method creates the action string for switching the application's online/offline status. It includes commands to restart relevant services and reload the application. The action string is used to define what happens when the status switch action is triggered.
int | $status | The status to switch to (enabled or disabled). |
Definition at line 56 of file class.tpl.app.online.php.
References TplAppReload\getActionReload(), TplService\getActionRestart(), TplApp\getActionRun(), BinApache\SERVICE_NAME, BinFilezilla\SERVICE_NAME, and Action\SWITCH_ONLINE.
|
static |
Generates the menu item and associated actions for switching the online/offline status.
This method creates a menu item for switching the application's online/offline status and defines the actions to be taken when the menu item is selected. It uses the global configuration and language objects to retrieve the current status and localized strings.
@global object $bearsamppConfig Provides access to the application's configuration settings. @global object $bearsamppLang Provides language support for retrieving language-specific values.
Definition at line 34 of file class.tpl.app.online.php.
References $bearsamppConfig, $bearsamppLang, Config\DISABLED, Config\ENABLED, TplApp\getActionMulti(), Lang\MENU_PUT_OFFLINE, and Lang\MENU_PUT_ONLINE.
Referenced by TplApp\getSectionMenuLeft().
const TplAppOnline::ACTION = 'status' |
Definition at line 20 of file class.tpl.app.online.php.