2024.8.23
Loading...
Searching...
No Matches
class.tpl.app.browser.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 TplAppBrowser
12
*
13
* This class provides methods to generate actions and menu items for changing the browser in the Bearsampp application.
14
* It includes functionalities for creating change browser actions and processing change browser commands.
15
*/
16
class
TplAppBrowser
17
{
18
// Constant for the change browser action identifier
19
const
ACTION
=
'changeBrowser'
;
20
21
/**
22
* Generates the change browser menu item and associated actions.
23
*
24
* This method creates a menu item for changing the browser and defines the actions to be taken
25
* when the change browser menu item is selected. It uses the global language object to retrieve the localized
26
* string for the change browser action.
27
*
28
* @global object $bearsamppLang Provides language support for retrieving language-specific values.
29
*
30
* @return array The generated menu item and actions for changing the browser.
31
*/
32
public
static
function
process
()
33
{
34
global
$bearsamppLang
;
35
36
return
TplApp::getActionMulti
(
37
self::ACTION,
null
,
38
array(
$bearsamppLang
->getValue(
Lang::CHANGE_BROWSER_TITLE
),
TplAestan::GLYPH_BROWSER
),
39
false
, get_called_class()
40
);
41
}
42
43
/**
44
* Generates the action to change the browser.
45
*
46
* This method creates the action string for changing the browser. It includes commands to reload the application
47
* after changing the browser. The action string is used to define what happens when the change browser action is triggered.
48
*
49
* @return string The generated action string for changing the browser.
50
*/
51
public
static
function
getActionChangeBrowser
()
52
{
53
return
TplApp::getActionRun
(
Action::CHANGE_BROWSER
) . PHP_EOL .
54
TplAppReload::getActionReload
();
55
}
56
}
$bearsamppLang
global $bearsamppLang
Definition
ajax.apache.php:16
Action\CHANGE_BROWSER
const CHANGE_BROWSER
Definition
class.action.php:19
Lang\CHANGE_BROWSER_TITLE
const CHANGE_BROWSER_TITLE
Definition
class.lang.php:300
TplAestan\GLYPH_BROWSER
const GLYPH_BROWSER
Definition
class.tpl.aestan.php:52
TplAppBrowser
Definition
class.tpl.app.browser.php:17
TplAppBrowser\ACTION
const ACTION
Definition
class.tpl.app.browser.php:19
TplAppBrowser\process
static process()
Definition
class.tpl.app.browser.php:32
TplAppBrowser\getActionChangeBrowser
static getActionChangeBrowser()
Definition
class.tpl.app.browser.php:51
TplAppReload\getActionReload
static getActionReload()
Definition
class.tpl.app.reload.php:52
TplApp\getActionMulti
static getActionMulti($action, $args=array(), $item=array(), $disabled=false, $class=false)
Definition
class.tpl.app.php:152
TplApp\getActionRun
static getActionRun($action, $args=array(), $item=array(), $waitUntilTerminated=true)
Definition
class.tpl.app.php:115
Bearsampp-development
sandbox
core
classes
tpls
app
class.tpl.app.browser.php
Generated by
1.11.0