Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[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

Merged
1 commit merged into from
Mar 8, 2011
Merged

Conversation

Seldaek
Copy link
Member

@Seldaek Seldaek commented Mar 7, 2011

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 :)

@kriswallsmith
Copy link
Contributor

What the use case for accessing all flash messages in a template?

@Seldaek
Copy link
Member Author

Seldaek commented Mar 7, 2011

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.

@kriswallsmith
Copy link
Contributor

I don't know... that can be done by setting a flash to an array, right?

@Seldaek
Copy link
Member Author

Seldaek commented Mar 7, 2011

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?

@kriswallsmith
Copy link
Contributor

No big deal here, it just looked questionable.

@Seldaek
Copy link
Member Author

Seldaek commented Mar 7, 2011

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.

@lsmith77
Copy link
Contributor

lsmith77 commented Mar 7, 2011

+1 on adding this .. thought it was added back when clearFlashes() was merged.

@ericclemmons
Copy link
Contributor

+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.

@fabpot
Copy link
Member

fabpot commented Mar 8, 2011

As session exposes getFlashes(), Twig has access to it, so it makes sense to also make it accessible for PHP templates. Merged.

SofHad pushed a commit to SofHad/symfony that referenced this pull request Oct 12, 2015
SofHad pushed a commit to SofHad/symfony that referenced this pull request Oct 12, 2015
…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:

![dialog_before](https://cloud.githubusercontent.com/assets/73419/9975960/6047b9c8-5ed1-11e5-81e0-a8f691a2a011.png)

**After**

I propose to use the Delete/Cancel dialog used in Apple systems, because it's more user friendly:

![dialog_after](https://cloud.githubusercontent.com/assets/73419/9975962/75aee46c-5ed1-11e5-8873-37ad97eb55f7.png)

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
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants