| Total Complexity | 8 |
| Total Lines | 33 |
| Duplicated Lines | 0 % |
| Coverage | 65% |
| Changes | 0 | ||
| 1 | <?php |
||
| 9 | class Display { |
||
| 10 | 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" ]; |
||
| 11 | |||
| 12 | public static function semanticMenu($id, $semantic) { |
||
| 13 | $links = self::getLinks (); |
||
| 14 | $menu = $semantic->htmlMenu ( $id, array_keys ( $links ) ); |
||
| 15 | $menu->asLinks ( array_values ( $links ), 'new' ); |
||
| 16 | $menu->setSecondary (); |
||
| 17 | return $menu; |
||
| 18 | } |
||
| 19 | |||
| 20 | 2 | public static function getLinks() { |
|
| 21 | 2 | $links = self::$links; |
|
| 22 | 2 | if (Framework::hasAdmin ()) { |
|
| 23 | 2 | $links ['UbiquityMyAdmin'] = 'Admin'; |
|
| 24 | } |
||
| 25 | 2 | return $links; |
|
| 26 | } |
||
| 27 | |||
| 28 | 2 | public static function getPageInfos() { |
|
| 29 | 2 | return [ 'Controller' => Framework::getController (),'Action' => Framework::getAction (),'Route' => Framework::getUrl (),'Path' => Router::path ( '' ),'ActiveTheme' => ThemesManager::getActiveTheme () ]; |
|
| 30 | } |
||
| 31 | |||
| 32 | 2 | public static function getDefaultPage() { |
|
| 38 | } |
||
| 39 | |||
| 40 | 2 | public static function getThemes() { |
|
| 41 | 2 | return ThemesManager::getAvailableThemes (); |
|
| 45 |