phiamo / MopaBootstrapSandboxBundle

Sandbox Bundle used to seperate live doc from code
http://bootstrap.mohrenweiserpartner.de
Other
24 stars 40 forks source link

Flash example for 2.0.x #9

Closed purplefish32 closed 12 years ago

purplefish32 commented 12 years ago

I cant seem to find how to set/retireve flash messages with the 2.0.x version, Could you please provide an example

phiamo commented 12 years ago

https://github.com/phiamo/MopaBootstrapBundle/blob/v2.0.x/Resources/views/base.html.twig#L48 that should be enough or?

purplefish32 commented 12 years ago

Wow, that was fast, I got that part and I am setting the falsh messages like this : $this->get('session')->setFlash( 'alert', 'wtf!' ); Can you confirm this is the correct syntax ?

phiamo commented 12 years ago

http://symfony.com/doc/current/book/controller.html#flash-messages says so .. dont have 2.0.x installation avail atm :(

purplefish32 commented 12 years ago

Found my error : type must be one of the following types = ['info', 'error', 'warning', 'success'] So my 'alert' type is wrong - Thanks for your time and keep up the excellent work

phiamo commented 12 years ago

np nice to hear