The `getFlashBag` method is a part of the `SessionInterface` class in Symfony's HttpFoundation component in PHP.
This method retrieves the flash bag associated with the current session. A flash bag is a container that holds temporary messages or data that can be used to display notifications or store information between different requests. It allows developers to store data in one request and retrieve it in a subsequent request.
The `getFlashBag` method returns an object that represents the flash bag, which can then be used to add, retrieve, or remove flash messages. Flash messages are typically used for displaying alerts, success messages, error messages, or any other transient information to the user.
This method is useful for managing session-based data in Symfony applications and making it available across different requests.
PHP Symfony\Component\HttpFoundation\Session SessionInterface::getFlashBag - 18 examples found. These are the top rated real world PHP examples of Symfony\Component\HttpFoundation\Session\SessionInterface::getFlashBag extracted from open source projects. You can rate examples to help us improve the quality of examples.