![]() |
Bearsampp 2026.9.23
|
Static Public Member Functions | |
| static | getActionChangeXlightPort () |
| static | getActionEnableXlight ($enable) |
| static | getActionInstallXlightService () |
| static | getActionRemoveXlightService () |
| static | getActionSwitchXlightVersion ($version) |
| static | getMenuXlight () |
| static | getMenuXlightService () |
| static | getMenuXlightVersions () |
| static | process () |
Data Fields | |
| const | ACTION_CHANGE_PORT = 'changeXlightPort' |
| const | ACTION_ENABLE = 'enableXlight' |
| const | ACTION_INSTALL_SERVICE = 'installXlightService' |
| const | ACTION_REMOVE_SERVICE = 'removeXlightService' |
| const | ACTION_SWITCH_VERSION = 'switchXlightVersion' |
| const | MENU = 'xlight' |
| const | MENU_SERVICE = 'xlightService' |
| const | MENU_VERSIONS = 'xlightVersions' |
Class TplAppXlight
This class provides methods to generate menu items and actions for managing Xlight within the Bearsampp application. It includes functionalities for enabling/disabling Xlight, switching versions, changing ports, and managing the Xlight service.
Definition at line 17 of file class.tpl.app.xlight.php.
|
static |
Generates the action to change the Xlight port.
This method creates the action string for changing the Xlight port and includes a command to reload the application.
Definition at line 254 of file class.tpl.app.xlight.php.
References $bearsamppBins, Action\CHANGE_PORT, TplAppReload\getActionReload(), and TplApp\getActionRun().
|
static |
Generates the action to enable or disable Xlight.
This method creates the action string for enabling or disabling Xlight and includes a command to reload the application.
| int | $enable | The enable flag (1 to enable, 0 to disable). |
Definition at line 151 of file class.tpl.app.xlight.php.
References $bearsamppBins, Action\ENABLE, TplAppReload\getActionReload(), and TplApp\getActionRun().
|
static |
Generates the action to install the Xlight service.
This method creates the action string for installing the Xlight service and includes a command to reload the application.
Definition at line 269 of file class.tpl.app.xlight.php.
References TplAppReload\getActionReload(), TplApp\getActionRun(), ActionService\INSTALL, Action\SERVICE, and BinXlight\SERVICE_NAME.
|
static |
Generates the action to remove the Xlight service.
This method creates the action string for removing the Xlight service and includes a command to reload the application.
Definition at line 282 of file class.tpl.app.xlight.php.
References TplAppReload\getActionReload(), TplApp\getActionRun(), ActionService\REMOVE, Action\SERVICE, and BinXlight\SERVICE_NAME.
|
static |
Generates the action to switch the Xlight version.
This method creates the action string for switching the Xlight version and includes a command to reload the application.
| string | $version | The version to switch to. |
Definition at line 170 of file class.tpl.app.xlight.php.
References $bearsamppBins, TplAppReload\getActionReload(), TplApp\getActionRun(), and Action\SWITCH_VERSION.
|
static |
Generates the Xlight menu.
This method creates the menu items and associated actions for Xlight, including options for downloading, enabling, switching versions, managing the service, and viewing logs.
@global object $bearsamppRoot Provides access to the root path of the application.
Definition at line 60 of file class.tpl.app.xlight.php.
References $bearsamppBins, $bearsamppConfig, $bearsamppLang, $bearsamppRoot, Config\DISABLED, Lang\DOWNLOAD_MORE, Config\ENABLED, TplApp\getActionMulti(), TplAestan\getItemLink(), TplAestan\getItemNotepad(), TplAestan\getItemSeparator(), TplApp\getMenu(), HttpClient\getWebsiteUrl(), TplAestan\GLYPH_BROWSER, TplAestan\GLYPH_CHECK, Lang\MENU_ENABLE, Lang\MENU_LOGS, TplApp\SECTION_CALL, TplApp\SECTION_CONTENT, Lang\SERVICE, and Lang\VERSIONS.
|
static |
Generates the Xlight service menu.
This method creates the menu items and associated actions for managing the Xlight service, including starting, stopping, restarting, changing ports, and installing or removing the service.
@global object $bearsamppRoot Provides access to the root path of the application.
Definition at line 190 of file class.tpl.app.xlight.php.
References $bearsamppBins, $bearsamppLang, $bearsamppRoot, $result, Action\CHECK_PORT, TplApp\getActionMulti(), TplApp\getActionRun(), TplAestan\getItemActionServiceRestart(), TplAestan\getItemActionServiceStart(), TplAestan\getItemActionServiceStop(), TplAestan\getItemNotepad(), TplAestan\getItemSeparator(), Path\getRootPath(), TplAestan\GLYPH_LIGHT, TplAestan\GLYPH_NETWORK, TplAestan\GLYPH_SERVICE_INSTALL, TplAestan\GLYPH_SERVICE_REMOVE, Lang\MENU_CHANGE_PORT, Lang\MENU_CHECK_PORT, Lang\MENU_INSTALL_SERVICE, Lang\MENU_REMOVE_SERVICE, Lang\MENU_UPDATE_ENV_PATH, TplApp\SECTION_CALL, and TplApp\SECTION_CONTENT.
|
static |
Generates the Xlight versions menu.
This method creates the menu items and associated actions for switching between different versions of Xlight.
Definition at line 115 of file class.tpl.app.xlight.php.
References $bearsamppBins, TplApp\getActionMulti(), TplAestan\GLYPH_CHECK, TplApp\SECTION_CALL, and TplApp\SECTION_CONTENT.
|
static |
Processes the Xlight menu.
This method generates the menu for enabling or disabling Xlight. It uses the global language object to retrieve the localized string for Xlight.
@global object $bearsamppLang Provides language support for retrieving language-specific values.
Definition at line 40 of file class.tpl.app.xlight.php.
References $bearsamppBins, $bearsamppLang, TplApp\getMenuEnable(), and Lang\XLIGHT.
Referenced by TplApp\getSectionMenuLeft().
| const ACTION_CHANGE_PORT = 'changeXlightPort' |
Definition at line 25 of file class.tpl.app.xlight.php.
| const ACTION_ENABLE = 'enableXlight' |
Definition at line 23 of file class.tpl.app.xlight.php.
| const ACTION_INSTALL_SERVICE = 'installXlightService' |
Definition at line 26 of file class.tpl.app.xlight.php.
| const ACTION_REMOVE_SERVICE = 'removeXlightService' |
Definition at line 27 of file class.tpl.app.xlight.php.
| const ACTION_SWITCH_VERSION = 'switchXlightVersion' |
Definition at line 24 of file class.tpl.app.xlight.php.
| const MENU = 'xlight' |
Definition at line 19 of file class.tpl.app.xlight.php.
| const MENU_SERVICE = 'xlightService' |
Definition at line 21 of file class.tpl.app.xlight.php.
| const MENU_VERSIONS = 'xlightVersions' |
Definition at line 20 of file class.tpl.app.xlight.php.