@@ -14,10 +14,10 @@ |
||
14 | 14 | ?><ul> |
15 | 15 | |
16 | 16 | <?php foreach ($links as $link) : |
17 | - $url = url($link["url"]); |
|
18 | - $text = $link["text"]; |
|
19 | - $title = isset($link["title"]) |
|
20 | - ? " title=\"${link["title"]}\"" |
|
17 | + $url = url($link[ "url" ]); |
|
18 | + $text = $link[ "text" ]; |
|
19 | + $title = isset($link[ "title" ]) |
|
20 | + ? " title=\"${link[ "title" ]}\"" |
|
21 | 21 | : null; |
22 | 22 | ?> |
23 | 23 | <li><a href="<?= $url ?>"<?= $title ?>><?= $text ?></a></li> |
@@ -13,7 +13,7 @@ |
||
13 | 13 | $navbar->setDI($di); |
14 | 14 | $html = $navbar->createMenuWithSubMenus($navbarConfig); |
15 | 15 | |
16 | -$classes = "rm-navbar-max rm-navbar rm-max rm-swipe-right " . ( $class ?? null); |
|
16 | +$classes = "rm-navbar-max rm-navbar rm-max rm-swipe-right " . ($class ?? null); |
|
17 | 17 | |
18 | 18 | |
19 | 19 | ?><!-- menu wrapper --> |
@@ -13,7 +13,7 @@ |
||
13 | 13 | $navbar->setDI($di); |
14 | 14 | $html = $navbar->createMenuWithSubMenus($navbarConfig); |
15 | 15 | |
16 | -$classes = "rm-navbar " . ( $class ?? null); |
|
16 | +$classes = "rm-navbar " . ($class ?? null); |
|
17 | 17 | |
18 | 18 | |
19 | 19 |
@@ -9,14 +9,14 @@ |
||
9 | 9 | // Show incoming variables and view helper functions |
10 | 10 | //echo showEnvironment(get_defined_vars(), get_defined_functions()); |
11 | 11 | |
12 | -$items = $navbarConfig["items"] ?? []; |
|
12 | +$items = $navbarConfig[ "items" ] ?? [ ]; |
|
13 | 13 | |
14 | -$classes = "navbar " . ($navbarConfig["class"] ?? null); |
|
14 | +$classes = "navbar " . ($navbarConfig[ "class" ] ?? null); |
|
15 | 15 | |
16 | 16 | |
17 | 17 | |
18 | 18 | ?><navbar <?= classList($classes) ?>> |
19 | 19 | <?php foreach ($items as $item) : ?> |
20 | - <a href="<?= url($item["url"]) ?>" title="<?= $item["title"] ?>"><?= $item["text"] ?></a> |
|
20 | + <a href="<?= url($item[ "url" ]) ?>" title="<?= $item[ "title" ] ?>"><?= $item[ "text" ] ?></a> |
|
21 | 21 | <?php endforeach; ?> |
22 | 22 | </navbar> |
@@ -15,7 +15,7 @@ |
||
15 | 15 | |
16 | 16 | <?php foreach ($toc as $route => $link) : |
17 | 17 | $url = url($route); |
18 | - $text = $link["title"]; // Should be text? |
|
18 | + $text = $link[ "title" ]; // Should be text? |
|
19 | 19 | $title = null; // Missmatch with $link["title"] |
20 | 20 | /* |
21 | 21 | $title = isset($link["title"]) |
@@ -26,17 +26,17 @@ |
||
26 | 26 | |
27 | 27 | |
28 | 28 | <?php $i = 1; foreach ($columns as $column) : |
29 | - $template = isset($column["template"]) |
|
30 | - ? $column["template"] |
|
29 | + $template = isset($column[ "template" ]) |
|
30 | + ? $column[ "template" ] |
|
31 | 31 | : __DIR__ . "/../block/default"; |
32 | 32 | ?> |
33 | 33 | |
34 | 34 | <div <?= classList("column $outerClass") ?>> |
35 | 35 | |
36 | 36 | <?php |
37 | - $column["classes"] = ["$outerClass-x", "$outerClass-$i"]; |
|
38 | - $data = isset($column["data"]) |
|
39 | - ? $column["data"] |
|
37 | + $column[ "classes" ] = [ "$outerClass-x", "$outerClass-$i" ]; |
|
38 | + $data = isset($column[ "data" ]) |
|
39 | + ? $column[ "data" ] |
|
40 | 40 | : $column; |
41 | 41 | renderView($template, $data); |
42 | 42 | ?> |
@@ -11,7 +11,7 @@ discard block |
||
11 | 11 | // Show incoming variables and view helper functions |
12 | 12 | //echo showEnvironment(get_defined_vars(), get_defined_functions()); |
13 | 13 | |
14 | -$htmlClass = $htmlClass ?? []; |
|
14 | +$htmlClass = $htmlClass ?? [ ]; |
|
15 | 15 | $lang = $lang ?? "sv"; |
16 | 16 | $charset = $charset ?? "utf-8"; |
17 | 17 | $title = ($title ?? "No title") . ($baseTitle ?? " | No base title defined"); |
@@ -22,33 +22,33 @@ discard block |
||
22 | 22 | $session = $di->get("session"); |
23 | 23 | if ($request->getGet("style")) { |
24 | 24 | $session->set("redirect", currentUrl()); |
25 | - redirect("style/update/" . rawurlencode($_GET["style"])); |
|
25 | + redirect("style/update/" . rawurlencode($_GET[ "style" ])); |
|
26 | 26 | } |
27 | 27 | |
28 | 28 | // Get the active stylesheet, if any. |
29 | 29 | $activeStyle = $session->get(StyleChooserController::getSessionKey(), null); |
30 | 30 | if ($activeStyle) { |
31 | - $stylesheets = []; |
|
32 | - $stylesheets[] = $activeStyle; |
|
31 | + $stylesheets = [ ]; |
|
32 | + $stylesheets[ ] = $activeStyle; |
|
33 | 33 | } |
34 | 34 | |
35 | 35 | // Get hgrid & vgrid |
36 | 36 | if ($request->hasGet("hgrid")) { |
37 | - $htmlClass[] = "hgrid"; |
|
37 | + $htmlClass[ ] = "hgrid"; |
|
38 | 38 | } |
39 | 39 | if ($request->hasGet("vgrid")) { |
40 | - $htmlClass[] = "vgrid"; |
|
40 | + $htmlClass[ ] = "vgrid"; |
|
41 | 41 | } |
42 | 42 | |
43 | 43 | // Show regions |
44 | 44 | if ($request->hasGet("regions")) { |
45 | - $htmlClass[] = "regions"; |
|
45 | + $htmlClass[ ] = "regions"; |
|
46 | 46 | } |
47 | 47 | |
48 | 48 | // Get flash message if any and add to region flash-message |
49 | 49 | $flashMessage = $session->getOnce("flashmessage"); |
50 | 50 | if ($flashMessage) { |
51 | - $di->get("view")->add(__DIR__ . "/../flashmessage/default", ["message" => $flashMessage], "flash-message"); |
|
51 | + $di->get("view")->add(__DIR__ . "/../flashmessage/default", [ "message" => $flashMessage ], "flash-message"); |
|
52 | 52 | } |
53 | 53 | |
54 | 54 | // Get current route to make as body class |
@@ -211,7 +211,7 @@ discard block |
||
211 | 211 | $sidebarLeft = regionHasContent("sidebar-left"); |
212 | 212 | $sidebarRight = regionHasContent("sidebar-right"); |
213 | 213 | $class = ""; |
214 | -$class .= $sidebarLeft ? "has-sidebar-left " : ""; |
|
214 | +$class .= $sidebarLeft ? "has-sidebar-left " : ""; |
|
215 | 215 | $class .= $sidebarRight ? "has-sidebar-right " : ""; |
216 | 216 | $class .= empty($class) ? "" : "has-sidebar"; |
217 | 217 | ?> |
@@ -10,9 +10,9 @@ |
||
10 | 10 | //echo showEnvironment(get_defined_vars(), get_defined_functions()); |
11 | 11 | |
12 | 12 | // Prepare classes |
13 | -$classes[] = "article"; |
|
13 | +$classes[ ] = "article"; |
|
14 | 14 | if (isset($class)) { |
15 | - $classes[] = $class; |
|
15 | + $classes[ ] = $class; |
|
16 | 16 | } |
17 | 17 | |
18 | 18 |
@@ -10,9 +10,9 @@ discard block |
||
10 | 10 | //echo showEnvironment(get_defined_vars(), get_defined_functions()); |
11 | 11 | |
12 | 12 | // Prepare classes |
13 | -$classes[] = "block"; |
|
13 | +$classes[ ] = "block"; |
|
14 | 14 | if (isset($class)) { |
15 | - $classes[] = $class; |
|
15 | + $classes[ ] = $class; |
|
16 | 16 | } |
17 | 17 | |
18 | 18 | // Load content details from route |
@@ -21,7 +21,7 @@ discard block |
||
21 | 21 | } |
22 | 22 | |
23 | 23 | // Prepare title |
24 | -$title = isset($title) && !empty($title)? $title : null; |
|
24 | +$title = isset($title) && !empty($title) ? $title : null; |
|
25 | 25 | $header = isset($header) ? $header : $title; |
26 | 26 | |
27 | 27 | // Prepare content into text |