File tree Expand file tree Collapse file tree 3 files changed +5
-18
lines changed Expand file tree Collapse file tree 3 files changed +5
-18
lines changed Original file line number Diff line number Diff line change 2121 "require" : {
2222 "php" : " >=5.3.3" ,
2323 "guzzle/http" : " 3.*" ,
24- "symfony/http-foundation" : " 2.* "
24+ "symfony/http-foundation" : " ~2.0 "
2525 },
2626 "require-dev" : {
2727 "guzzle/plugin-mock" : " 3.*" ,
Original file line number Diff line number Diff line change 2121// enable Silex debugging
2222$ app ['debug ' ] = true ;
2323
24- // twig globals
25- $ app ->before ( function () use ( $ app ) {
26- $ notice = $ app ['session ' ]->getFlash ('notice ' );
27- if ($ notice ) {
28- $ app ['twig ' ]->addGlobal ('notice ' , $ notice );
29- }
30- });
31-
3224// root route
3325$ app ->get ('/ ' , function () use ($ app ) {
3426 $ gateways = array_map (function ($ name ) {
6254 $ app ['session ' ]->set ($ sessionVar , $ gateway ->getParameters ());
6355
6456 // redirect back to gateway settings page
65- $ app ['session ' ]->setFlash ('success ' , 'Gateway settings updated! ' );
57+ $ app ['session ' ]->getFlashBag ()-> add ('success ' , 'Gateway settings updated! ' );
6658
6759 return $ app ->redirect ($ app ['request ' ]->getPathInfo ());
6860});
Original file line number Diff line number Diff line change 99 <div class =" container" >
1010 <h1 >{{ title }}</h1 >
1111
12- {% set success = app .session .flash (' success' ) %}
13- {% set error = app .session .flash (' error' ) %}
14- {% if success %}
15- <div class =" alert alert-success" >{{ success }}</div >
16- {% endif %}
17- {% if error %}
18- <div class =" alert alert-error" >{{ error }}</div >
19- {% endif %}
12+ {% for message in app .session .flashbag .get (' success' ) %}
13+ <div class =" alert alert-success" >{{ message }}</div >
14+ {% endfor %}
2015
2116 {% block content %}{% endblock %}
2217 </div >
You can’t perform that action at this time.
0 commit comments