2024.8.23
Loading...
Searching...
No Matches
class.tpl.app.apps.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 TplAppApps
12 *
13 * This class provides methods to generate and manage the "Apps" menu within the Bearsampp application.
14 * It includes functionalities for creating the menu and adding specific application links.
15 */
17{
18 /**
19 * Constant representing the menu identifier for apps.
20 */
21 const MENU = 'apps';
22
23 /**
24 * Processes and generates the "Apps" menu.
25 *
26 * This method generates the "Apps" menu by calling the `getMenu` method from the `TplApp` class.
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 menu content.
31 */
32 public static function process()
33 {
34 global $bearsamppLang;
35
36 return TplApp::getMenu($bearsamppLang->getValue(Lang::APPS), self::MENU, get_called_class());
37 }
38
39 /**
40 * Generates the content of the "Apps" menu.
41 *
42 * This method generates the content of the "Apps" menu by adding links to various applications
43 * such as Adminer, phpMyAdmin, phpPgAdmin, and Webgrind.
44 *
45 * @global object $bearsamppLang Provides language support for retrieving language-specific values.
46 *
47 * @return string The generated menu content as a concatenated string.
48 */
49 public static function getMenuApps()
50 {
51 global $bearsamppLang;
52
55 'adminer/',
56 true
57 ) . PHP_EOL .
60 'phpmyadmin/',
61 true
62 ) . PHP_EOL .
65 'phppgadmin/',
66 true
67 ) . PHP_EOL .
70 'webgrind/',
71 true
72 );
73 }
74}
global $bearsamppLang
const PHPPGADMIN
const APPS
const ADMINER
const WEBGRIND
const PHPMYADMIN
static getItemLink($caption, $link, $local=false, $glyph=self::GLYPH_WEB_PAGE)
static getMenu($caption, $menu, $class)