Bearsampp 2025.8.29
Loading...
Searching...
No Matches
class.tpl.app.logsVerbose.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
18{
19 // Constant for the logs verbosity menu identifier
20 const MENU = 'logsVerbose';
21
32 public static function process()
33 {
34 global $bearsamppLang;
35
36 return TplApp::getMenu($bearsamppLang->getValue(Lang::LOGS_VERBOSE), self::MENU, get_called_class());
37 }
38
51 public static function getMenuLogsVerbose()
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 }
81
92 public static function getActionSwitchLogsVerbose($verbose)
93 {
94 return TplApp::getActionRun(Action::SWITCH_LOGS_VERBOSE, array($verbose)) . PHP_EOL .
96 }
97}
global $bearsamppLang
const SWITCH_LOGS_VERBOSE
const VERBOSE_REPORT
const VERBOSE_SIMPLE
const VERBOSE_TRACE
const VERBOSE_DEBUG
const LOGS_VERBOSE
const VERBOSE_REPORT
const VERBOSE_SIMPLE
const VERBOSE_TRACE
const VERBOSE_DEBUG
static getActionMulti($action, $args=array(), $item=array(), $disabled=false, $class=false)
static getMenu($caption, $menu, $class)
static getActionRun($action, $args=array(), $item=array(), $waitUntilTerminated=true)
const SECTION_CALL
const SECTION_CONTENT
static getActionSwitchLogsVerbose($verbose)
global $bearsamppConfig
Definition homepage.php:27