Ubiquity
2.5.2
php rapid development framework
Loading...
Searching...
No Matches
Display.php
Go to the documentation of this file.
1
<?php
2
3
namespace
Ubiquity\core\postinstall
;
4
5
use
Ubiquity\core\Framework
;
6
use
Ubiquity\themes\ThemesManager
;
7
16
class
Display
{
17
private
static
$links
= [
"Website"
=>
"https://ubiquity.kobject.net"
,
"Guide"
=>
"https://micro-framework.readthedocs.io/en/latest/?badge=latest"
,
"Documentation API"
=>
"https://api.kobject.net/ubiquity/"
,
"GitHub"
=>
"https://github.com/phpMv/ubiquity"
];
18
19
public
static
function
semanticMenu
($id, $semantic) {
20
$links
=
self::getLinks
();
21
$menu = $semantic->htmlMenu($id, \array_keys(
$links
));
22
$menu->asLinks(\array_values(
$links
),
'new'
);
23
$menu->setSecondary();
24
return
$menu;
25
}
26
27
public
static
function
getLinks
() {
28
$links
=
self::$links
;
29
if
(
Framework::hasAdmin
()) {
30
$links
[
'Webtools'
] =
'Admin'
;
31
}
32
return
$links
;
33
}
34
35
public
static
function
getPageInfos
() {
36
return
[
'Controller'
=>
Framework::getController
(),
'Action'
=>
Framework::getAction
(),
'Route'
=>
Framework::getUrl
(),
'Path'
=>
'/'
,
'ActiveTheme'
=> ThemesManager::getActiveTheme() ??
'none'
,
'Cache'
=>
Framework::getCacheSystem
(),
'Annotations'
=>
Framework::getAnnotationsEngine
()];
37
}
38
39
public
static
function
getDefaultPage
() {
40
$activeTheme = ThemesManager::getActiveTheme();
41
if
($activeTheme ==
null
|| ThemesManager::isCustom($activeTheme)) {
42
$activeTheme =
"index"
;
43
}
44
return
'@framework/index/'
. $activeTheme .
'.html'
;
45
}
46
47
public
static
function
getThemes
() {
48
return
ThemesManager::getAvailableThemes();
49
}
50
}
51
Ubiquity\core\Framework
Definition
Framework.php:24
Ubiquity\core\Framework\getController
static getController()
Returns the active controller class name.
Definition
Framework.php:47
Ubiquity\core\Framework\getAnnotationsEngine
static getAnnotationsEngine()
Definition
Framework.php:107
Ubiquity\core\Framework\getUrl
static getUrl()
Gets the active URL.
Definition
Framework.php:63
Ubiquity\core\Framework\hasAdmin
static hasAdmin()
Definition
Framework.php:95
Ubiquity\core\Framework\getCacheSystem
static getCacheSystem()
Definition
Framework.php:103
Ubiquity\core\Framework\getAction
static getAction()
Returns the active action.
Definition
Framework.php:55
Ubiquity\core\postinstall\Display
Ubiquity\core\postinstall$Display This class is part of Ubiquity.
Definition
Display.php:16
Ubiquity\core\postinstall\Display\$links
static $links
Definition
Display.php:17
Ubiquity\core\postinstall\Display\getPageInfos
static getPageInfos()
Definition
Display.php:35
Ubiquity\core\postinstall\Display\semanticMenu
static semanticMenu($id, $semantic)
Definition
Display.php:19
Ubiquity\core\postinstall\Display\getThemes
static getThemes()
Definition
Display.php:47
Ubiquity\core\postinstall\Display\getDefaultPage
static getDefaultPage()
Definition
Display.php:39
Ubiquity\core\postinstall\Display\getLinks
static getLinks()
Definition
Display.php:27
Ubiquity\themes\ThemesManager
Themes manager.
Definition
ThemesManager.php:22
Ubiquity\core\postinstall
Definition
Display.php:3
C:
Users
myadd
Documents
GitHub
ubiquity-doc-api
vendor
phpmv
ubiquity
src
Ubiquity
core
postinstall
Display.php
Generated on Sun Dec 10 2023 15:04:20 for
Ubiquity
by
doxygen
1.9.8