-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[FrameworkBundle] Session helper #191
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
What the use case for accessing all flash messages in a template? |
Building a generic facility in your layout that displays all messages, no matter what their key is, and uses the key as the css class for example. |
I don't know... that can be done by setting a flash to an array, right? |
That would require that you use the exact same flash message key everywhere in your app, and then wrap the message in a hash with class/message. Kinda sucks. I really don't see what's the big deal about adding this method? |
No big deal here, it just looked questionable. |
Well alright, IMO all collections-of-stuff that are protected should be accessible as a whole. There always is a use case for iterating over stuff versus knowing exactly what you want. |
+1 on adding this .. thought it was added back when clearFlashes() was merged. |
+1 as well. Migrating from Zend Framework to Symfony2, our apps may emit several messages with different keys which are displayed on the following page with their respective styling. |
As session exposes getFlashes(), Twig has access to it, so it makes sense to also make it accessible for PHP templates. Merged. |
…ion (yceruto, javiereguiluz) This PR was merged into the master branch. Discussion ---------- Use a modal window to confirm the blog post deletion This pull request finished symfony#202 by making some tweaks to the design of the delete dialog. **Before** We used the classic Yes/No dialog mostly used in Windows systems:  **After** I propose to use the Delete/Cancel dialog used in Apple systems, because it's more user friendly:  I've just tweaked this dialog contents. The rest of the pull request is the result of the great work made by @yceruto. Commits ------- 620162b Updated the styles for the latest changes 36e61c5 Use a modal window to confirm the blog post deletion 0a2e717 disable submit button on submit. fecb034 rename js file e07792d fixing file documentation db88d34 fixing file documentation c0aaf79 confirmation message using bootstrap modal a41db16 using short name and statements 0a8299f avoids a DOM query for 'body' and avoids the need to wait for DOM ready db98a4e check the show_confirmation_message value 86d4f1c using event delegation d731ee8 removed multi-purpose variables 775ddba removing old code 167e3a1 confirmation message now listen from submit event of the form fd91b05 Removed return statement and improving the code. 40e771d Fixing translation position f6aa107 feature symfony#191 Add confirmation message before to delete a post
Found this while cleaning up my 50 branches.. Couldn't find the associated pull request, but it still sounds to me like a valid use case to snatch all flashes at once and loop over them. Sorry if I'm repeating myself :)