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

Static Public Member Functions

static getActionGenSslCertificate ()
 
static getMenuTools ()
 
static process ()
 

Data Fields

const ACTION_GEN_SSL_CERTIFICATE = 'genSslCertificate'
 
const MENU = 'tools'
 

Detailed Description

Class TplAppTools

This class provides methods to generate menu items and actions for managing various tools within the Bearsampp application. It includes functionalities for accessing tools like Git, Python, Composer, Ghostscript, Ngrok, Pear, Perl, Ruby, XDebugClient, Yarn, and more.

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

Member Function Documentation

◆ getActionGenSslCertificate()

static TplAppTools::getActionGenSslCertificate ( )
static

Generates the action to generate an SSL certificate.

Returns
string The generated action to generate an SSL certificate.

Definition at line 155 of file class.tpl.app.tools.php.

156 {
158 }
const GEN_SSL_CERTIFICATE
static getActionRun($action, $args=array(), $item=array(), $waitUntilTerminated=true)

References Action\GEN_SSL_CERTIFICATE, and TplApp\getActionRun().

◆ getMenuTools()

static TplAppTools::getMenuTools ( )
static

Generates the Tools menu with options for accessing various tools like Git, Python, Composer, etc.

@global object $bearsamppLang Provides language support for retrieving language-specific values. @global object $bearsamppCore Provides access to core functionalities and configurations. @global object $bearsamppTools Provides access to various tools and their configurations.

Returns
string The generated menu items and actions for Tools.

Definition at line 46 of file class.tpl.app.tools.php.

47 {
48 global $bearsamppLang, $bearsamppCore, $bearsamppTools;
49 $resultItems = $resultActions = '';
50
51 // Git
52 $tplGit = TplAppGit::process();
53 $resultItems .= $tplGit[TplApp::SECTION_CALL] . PHP_EOL;
54 $resultActions .= $tplGit[TplApp::SECTION_CONTENT] . PHP_EOL;
55
56 // Python
57 $tplPython = TplAppPython::process();
58 $resultItems .= $tplPython[TplApp::SECTION_CALL] . PHP_EOL;
59 $resultActions .= $tplPython[TplApp::SECTION_CONTENT] . PHP_EOL;
60
61 // Composer
62 $resultItems .= TplAestan::getItemConsoleZ(
65 $bearsamppTools->getConsoleZ()->getTabTitleComposer()
66 ) . PHP_EOL;
67
68 // Ghostscript
69 $resultItems .= TplAestan::getItemConsoleZ(
72 $bearsamppTools->getConsoleZ()->getTabTitleGhostscript()
73 ) . PHP_EOL;
74
75 // Ngrok
76 $resultItems .= TplAestan::getItemConsoleZ(
77 $bearsamppLang->getValue(Lang::NGROK),
79 $bearsamppTools->getConsoleZ()->getTabTitleNgrok()
80 ) . PHP_EOL;
81
82 // Pear
83 $resultItems .= TplAestan::getItemConsoleZ(
84 $bearsamppLang->getValue(Lang::PEAR),
86 $bearsamppTools->getConsoleZ()->getTabTitlePear()
87 ) . PHP_EOL;
88
89 // Perl
90 $resultItems .= TplAestan::getItemConsoleZ(
91 $bearsamppLang->getValue(Lang::PERL),
93 $bearsamppTools->getConsoleZ()->getTabTitlePerl()
94 ) . PHP_EOL;
95
96 // Ruby
97 $resultItems .= TplAestan::getItemConsoleZ(
98 $bearsamppLang->getValue(Lang::RUBY),
100 $bearsamppTools->getConsoleZ()->getTabTitleRuby()
101 ) . PHP_EOL;
102
103 // XDebugClient
104 $resultItems .= TplAestan::getItemExe(
105 $bearsamppLang->getValue(Lang::XDC),
106 $bearsamppTools->getXdc()->getExe(),
108 ) . PHP_EOL;
109
110 // Yarn
111 $resultItems .= TplAestan::getItemConsoleZ(
112 $bearsamppLang->getValue(Lang::YARN),
114 $bearsamppTools->getConsoleZ()->getTabTitleYarn()
115 ) . PHP_EOL;
116 $resultItems .= TplAestan::getItemSeparator() . PHP_EOL;
117
118 // Console
119 $resultItems .= TplAestan::getItemConsoleZ(
120 $bearsamppLang->getValue(Lang::CONSOLE),
122 ) . PHP_EOL;
123
124 // HostsEditor
125 $resultItems .= TplAestan::getItemExe(
127 $bearsamppCore->getHostsEditorExe(),
129 ) . PHP_EOL;
130
131 // Generate SSL Certificate
132 $tplGenSslCertificate = TplApp::getActionMulti(
133 self::ACTION_GEN_SSL_CERTIFICATE, null,
135 false, get_called_class()
136 );
137 $resultItems .= $tplGenSslCertificate[TplApp::SECTION_CALL] . PHP_EOL;
138 $resultActions .= $tplGenSslCertificate[TplApp::SECTION_CONTENT];
139
140 // Pwgen password manager
141 $resultItems .= TplAestan::getItemExe(
142 $bearsamppLang->getValue(Lang::PWGEN),
143 $bearsamppCore->getPwgenExe(),
145 ) . PHP_EOL;
146
147 return $resultItems . PHP_EOL . $resultActions;
148 }
global $bearsamppLang
global $bearsamppCore
const RUBY
const HOSTSEDITOR
const PWGEN
const YARN
const NGROK
const COMPOSER
const PEAR
const GHOSTSCRIPT
const XDC
const PERL
const CONSOLE
const MENU_GEN_SSL_CERTIFICATE
const GLYPH_GHOSTSCRIPT
static getItemSeparator()
static getItemConsoleZ($caption, $glyph, $id=null, $title=null, $initDir=null, $command=null)
const GLYPH_HOSTSEDITOR
const GLYPH_SSL_CERTIFICATE
static getItemExe($caption, $exe, $glyph, $params=null)
static getActionMulti($action, $args=array(), $item=array(), $disabled=false, $class=false)
const SECTION_CALL
const SECTION_CONTENT

References $bearsamppCore, $bearsamppLang, Lang\COMPOSER, Lang\CONSOLE, TplApp\getActionMulti(), TplAestan\getItemConsoleZ(), TplAestan\getItemExe(), TplAestan\getItemSeparator(), Lang\GHOSTSCRIPT, TplAestan\GLYPH_COMPOSER, TplAestan\GLYPH_CONSOLEZ, TplAestan\GLYPH_DEBUG, TplAestan\GLYPH_GHOSTSCRIPT, TplAestan\GLYPH_HOSTSEDITOR, TplAestan\GLYPH_NGROK, TplAestan\GLYPH_PEAR, TplAestan\GLYPH_PERL, TplAestan\GLYPH_PWGEN, TplAestan\GLYPH_RUBY, TplAestan\GLYPH_SSL_CERTIFICATE, TplAestan\GLYPH_YARN, Lang\HOSTSEDITOR, Lang\MENU_GEN_SSL_CERTIFICATE, Lang\NGROK, Lang\PEAR, Lang\PERL, TplAppGit\process(), TplAppPython\process(), Lang\PWGEN, Lang\RUBY, TplApp\SECTION_CALL, TplApp\SECTION_CONTENT, Lang\XDC, and Lang\YARN.

◆ process()

static TplAppTools::process ( )
static

Generates the main Tools menu with options to access various tools.

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

Returns
array The generated menu items and actions for Tools.

Definition at line 30 of file class.tpl.app.tools.php.

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

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

Referenced by TplApp\getSectionMenuLeft().

+ Here is the caller graph for this function:

Field Documentation

◆ ACTION_GEN_SSL_CERTIFICATE

const TplAppTools::ACTION_GEN_SSL_CERTIFICATE = 'genSslCertificate'

Definition at line 21 of file class.tpl.app.tools.php.

◆ MENU

const TplAppTools::MENU = 'tools'

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


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