symfony - How to set symfony2 flash message in diferente Aplication Context? -


i have application frontend(sales) , backend(administration), want set flash messages separated context, because when i'm login in both context i'm received in backend messages belong frontend, , don't want it.

sorry english i'm not english speaker. king regards

if using sessions flash bag need use different names when adding message. example use following admin messages:

// in controller $this->get('session')->getflashbag()   ->add('admin_error','no user found email address');  .........................................................  {# in template #} {% flashmessage in app.session.flashbag.get('admin_error') %}   <div class="error-message">{{ flashmessage }}</div> {% endfor %} 

then same thing in public controllers/templates replace 'admin_error' 'public_error'.


Comments

Popular posts from this blog

symfony - TEST environment only: The database schema is not in sync with the current mapping file -

twig - Using Twigbridge in a Laravel 5.1 Package -

jdbc - Not able to establish database connection in eclipse -