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

Static Public Member Functions

static getActionSwitchLogsVerbose ($verbose)
 
static getMenuLogsVerbose ()
 
static process ()
 

Data Fields

const MENU = 'logsVerbose'
 

Detailed Description

Class TplAppLogsVerbose

This class provides methods to generate and manage the logs verbosity menu and actions within the Bearsampp application. It includes functionalities for creating the logs verbosity menu and processing actions to switch the logs verbosity level.

Definition at line 17 of file class.tpl.app.logsVerbose.php.

Member Function Documentation

◆ getActionSwitchLogsVerbose()

static TplAppLogsVerbose::getActionSwitchLogsVerbose ( $verbose)
static

Generates the action to switch the logs verbosity level.

This method creates the action string for switching the logs verbosity level. It includes commands to reload the application after changing the verbosity level.

Parameters
int$verboseThe verbosity level to switch to.
Returns
string The generated action string for switching the logs verbosity level.

Definition at line 92 of file class.tpl.app.logsVerbose.php.

93 {
94 return TplApp::getActionRun(Action::SWITCH_LOGS_VERBOSE, array($verbose)) . PHP_EOL .
96 }
const SWITCH_LOGS_VERBOSE
static getActionRun($action, $args=array(), $item=array(), $waitUntilTerminated=true)

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

◆ getMenuLogsVerbose()

static TplAppLogsVerbose::getMenuLogsVerbose ( )
static

Generates the menu items and actions for switching logs verbosity levels.

This method creates menu items for each verbosity level and defines the actions to be taken when a verbosity level is selected. It uses the global language object to retrieve the localized strings for each verbosity level and the global configuration object to get the current verbosity level.

@global object $bearsamppLang Provides language support for retrieving language-specific values. @global object $bearsamppConfig Provides access to the application's configuration settings.

Returns
string The generated menu items and actions for switching logs verbosity levels.

Definition at line 51 of file class.tpl.app.logsVerbose.php.

52 {
54
55 $items = '';
56 $actions = '';
57
58 $verboses = array(
63 );
64
65 foreach ($verboses as $verbose => $caption) {
66 $tplSwitchLogsVerbose = TplApp::getActionMulti(
67 Action::SWITCH_LOGS_VERBOSE, array($verbose),
68 array($caption, $verbose == $bearsamppConfig->getLogsVerbose() ? TplAestan::GLYPH_CHECK : ''),
69 false, get_called_class()
70 );
71
72 // Item
73 $items .= $tplSwitchLogsVerbose[TplApp::SECTION_CALL] . PHP_EOL;
74
75 // Action
76 $actions .= PHP_EOL . $tplSwitchLogsVerbose[TplApp::SECTION_CONTENT] . PHP_EOL;
77 }
78
79 return $items . $actions;
80 }
global $bearsamppLang
const VERBOSE_REPORT
const VERBOSE_DEBUG
const VERBOSE_SIMPLE
const VERBOSE_TRACE
const VERBOSE_DEBUG
const VERBOSE_REPORT
const VERBOSE_SIMPLE
const VERBOSE_TRACE
static getActionMulti($action, $args=array(), $item=array(), $disabled=false, $class=false)
const SECTION_CALL
const SECTION_CONTENT
global $bearsamppConfig
Definition homepage.php:26

References $bearsamppConfig, $bearsamppLang, TplApp\getActionMulti(), TplAestan\GLYPH_CHECK, TplApp\SECTION_CALL, TplApp\SECTION_CONTENT, Action\SWITCH_LOGS_VERBOSE, Config\VERBOSE_DEBUG, Lang\VERBOSE_DEBUG, Config\VERBOSE_REPORT, Lang\VERBOSE_REPORT, Config\VERBOSE_SIMPLE, Lang\VERBOSE_SIMPLE, Config\VERBOSE_TRACE, and Lang\VERBOSE_TRACE.

◆ process()

static TplAppLogsVerbose::process ( )
static

Generates the logs verbosity menu.

This method creates a menu for selecting the logs verbosity level. It uses the global language object to retrieve the localized string for the logs verbosity menu.

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

Returns
array The generated menu for selecting the logs verbosity level.

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

33 {
34 global $bearsamppLang;
35
36 return TplApp::getMenu($bearsamppLang->getValue(Lang::LOGS_VERBOSE), self::MENU, get_called_class());
37 }
const LOGS_VERBOSE
static getMenu($caption, $menu, $class)

References $bearsamppLang, TplApp\getMenu(), and Lang\LOGS_VERBOSE.

Referenced by TplApp\getSectionMenuRight().

+ Here is the caller graph for this function:

Field Documentation

◆ MENU

const TplAppLogsVerbose::MENU = 'logsVerbose'

Definition at line 20 of file class.tpl.app.logsVerbose.php.


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