You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
minor #5640 Update controller.rst clarifying automatic deletion for flash messages (miguelvilata)
This PR was submitted for the 2.7 branch but it was merged into the 2.3 branch instead (closes#5640).
Discussion
----------
Update controller.rst clarifying automatic deletion for flash messages
Hello.
It's neccesary clarify that flash messages aren't removed automatically when next session comes. They are removed because the use of get() method in FlashBag object. If you use peek() method, or simply don't show stored messages they remain in session.
Show get() method in Symfony\Component\HttpFoundation\Session\Flash\FlashBag:
/**
* {@inheritdoc}
*/
public function get($type, array $default = array())
{
if (!$this->has($type)) {
return $default;
}
$return = $this->flashes[$type];
unset($this->flashes[$type]);
return $return;
}
Commits
-------
e6556b5 Update controller.rst
0 commit comments