2024.8.23
Loading...
Searching...
No Matches
TplAppLaunchStartup Class Reference

Static Public Member Functions

static getActionLaunchStartup ($launchStartup)
 
static process ()
 

Data Fields

const ACTION = 'launchStartup'
 

Detailed Description

Class TplAppLaunchStartup

This class provides methods to generate actions and menu items for launching the Bearsampp application at startup. It includes functionalities for creating launch startup actions and processing launch startup commands.

Definition at line 16 of file class.tpl.app.launchStartup.php.

Member Function Documentation

◆ getActionLaunchStartup()

static TplAppLaunchStartup::getActionLaunchStartup ( $launchStartup)
static

Generates the action to launch the application at startup.

This method creates the action string for launching the application at startup. It includes commands to reload the application configuration. The action string is used to define what happens when the launch startup action is triggered.

Parameters
int$launchStartupThe status to set for launch startup (enabled or disabled).
Returns
string The generated action string for launching the application at startup.

Definition at line 55 of file class.tpl.app.launchStartup.php.

56 {
57 return TplApp::getActionRun(Action::LAUNCH_STARTUP, array($launchStartup)) . PHP_EOL .
59 }
const LAUNCH_STARTUP
static getActionRun($action, $args=array(), $item=array(), $waitUntilTerminated=true)

References TplAppReload\getActionReload(), TplApp\getActionRun(), and Action\LAUNCH_STARTUP.

◆ process()

static TplAppLaunchStartup::process ( )
static

Generates the launch startup menu item and associated actions.

This method creates a menu item for launching the application at startup and defines the actions to be taken when the launch startup menu item is selected. It checks the current launch startup status and toggles it. It uses the global language object to retrieve the localized string for the launch startup action.

@global object $bearsamppLang Provides language support for retrieving language-specific values.

Returns
array The generated menu item and actions for launching the application at startup.

Definition at line 32 of file class.tpl.app.launchStartup.php.

33 {
34 global $bearsamppLang;
35
36 $isLaunchStartup = Util::isLaunchStartup();
38 self::ACTION, array($isLaunchStartup ? Config::DISABLED : Config::ENABLED),
39 array($bearsamppLang->getValue(Lang::MENU_LAUNCH_STARTUP), $isLaunchStartup ? TplAestan::GLYPH_CHECK : ''),
40 false, get_called_class()
41 );
42 }
global $bearsamppLang
const DISABLED
static getActionMulti($action, $args=array(), $item=array(), $disabled=false, $class=false)
static isLaunchStartup()

References $bearsamppLang, Config\DISABLED, Config\ENABLED, TplApp\getActionMulti(), TplAestan\GLYPH_CHECK, Util\isLaunchStartup(), and Lang\MENU_LAUNCH_STARTUP.

Referenced by TplApp\getSectionMenuRight().

+ Here is the caller graph for this function:

Field Documentation

◆ ACTION

const TplAppLaunchStartup::ACTION = 'launchStartup'

Definition at line 19 of file class.tpl.app.launchStartup.php.


The documentation for this class was generated from the following file: