From 423129486c32a6e93f7bad5ee40e1e1844613e0c Mon Sep 17 00:00:00 2001 From: Hugo Sales Date: Mon, 6 Jul 2020 22:16:50 +0000 Subject: [PATCH] [CONTROLLER] Show dummy notices in main/all --- src/Controller/NetworkPublic.php | 11 ++++------- templates/network/public.html.twig | 8 +++++++- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/src/Controller/NetworkPublic.php b/src/Controller/NetworkPublic.php index 5cfc568196..df70df066d 100644 --- a/src/Controller/NetworkPublic.php +++ b/src/Controller/NetworkPublic.php @@ -31,8 +31,6 @@ namespace App\Controller; use App\Core\Controller; -use App\Core\Event; -use App\Util\Common; class NetworkPublic extends Controller { @@ -43,10 +41,9 @@ class NetworkPublic extends Controller public function handle() { - Event::handle('Test', ['foobar']); - - Common::config('url', 'shortener'); - - return ['_template' => 'network/public.html.twig']; + return [ + '_template' => 'network/public.html.twig', + 'notices' => ['some notice', 'some other notice', 'some other more diferent notice'], + ]; } } diff --git a/templates/network/public.html.twig b/templates/network/public.html.twig index 85b0338541..8c7cf27bea 100644 --- a/templates/network/public.html.twig +++ b/templates/network/public.html.twig @@ -15,6 +15,12 @@ {% block body %}{% endblock %} {% block javascripts %}{% endblock %} -

Imagine some notices here

+ {% if notices is defined %} + {% for notice in notices %} +
{{notice}}
+ {% endfor %} + {% else %} + No notices here. + {% endif %}