|
|
@@ -55,6 +55,15 @@ function addNavbar($twig) |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
function addNavbar2($twig) |
|
|
|
{ |
|
|
|
$urls = [ |
|
|
|
["link" => "https://www.google.be", "name" => "Bing"], |
|
|
|
["link" => "https://www.facebook.com", "name" => "Apple"], |
|
|
|
["link" => "https://www.twiter.com", "name" => "TikTok"] |
|
|
|
]; |
|
|
|
$twig->addBlockVariable('navbar', ['urls' => $urls]); |
|
|
|
} |
|
|
|
|
|
|
|
function addFooter($response) |
|
|
|
{ |
|
|
@@ -82,6 +91,7 @@ $app->get('/', function (Request $request, Response $response, array $args) { |
|
|
|
|
|
|
|
$twig = $this->get('twig'); |
|
|
|
addNavbar($twig); |
|
|
|
addNavbar2($twig); |
|
|
|
$err = ['type' => 'error', 'text' => "something's wrong"]; |
|
|
|
|
|
|
|
$twig->addMessage($err); |