2024.8.23
Loading...
Searching...
No Matches
class.tpl.app.exit.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
10/**
11 * Class TplAppExit
12 *
13 * This class provides methods to handle the exit action within the Bearsampp application.
14 * It includes functionalities to process the exit action and generate the necessary action strings.
15 */
17{
18 /**
19 * Constant representing the exit action.
20 */
21 const ACTION = 'exit';
22
23 /**
24 * Processes the exit action and generates the necessary action strings.
25 *
26 * This method generates a multi-action string for the exit action, including the caption and glyph.
27 *
28 * @global object $bearsamppLang Provides language support for retrieving language-specific values.
29 *
30 * @return array An array containing the call string and the section content for the exit action.
31 */
32 public static function process()
33 {
34 global $bearsamppLang;
35
37 self::ACTION,
38 null,
40 false,
41 get_called_class()
42 );
43 }
44
45 /**
46 * Generates the action string to execute the exit action.
47 *
48 * This method generates a run action string for the quit action and appends the exit action.
49 *
50 * @return string The generated action string for the exit action.
51 */
52 public static function getActionExit()
53 {
54 return TplApp::getActionRun(Action::QUIT) . PHP_EOL . 'Action: exit';
55 }
56}
global $bearsamppLang
const QUIT
const QUIT
static getActionExit()
static getActionMulti($action, $args=array(), $item=array(), $disabled=false, $class=false)
static getActionRun($action, $args=array(), $item=array(), $waitUntilTerminated=true)