vendor/symfony/framework-bundle/Controller/ControllerTrait.php
/**
     * Adds a flash message to the current session for type.
     *
     * @throws \LogicException
     *
     * @final
     */
Adds a flash message to the current session for type.

@final
Adds a flash message to the current session for type . @final
protected function addFlash(string $type, string $message)
    {
        if (!$this->container->has('session')) {
            throw new \LogicException('You can not use the addFlash method if sessions are disabled. Enable them in "config/packages/framework.yaml".');
        }
        $this->container->get('session')->getFlashBag()->add($type, $message);
    }
protected function addFlash ( string $ type , string $ message ) { if ( ! $ this -> container -> has ( 'session' ) ) { throw new \ LogicException ( 'You can not use the addFlash method if sessions are disabled. Enable them in "config/packages/framework.yaml".' ) ; } $ this -> container -> get ( 'session' ) -> getFlashBag ( ) -> add ( $ type , $ message ) ; }
Adds a flash message to the current session for type.
Adds a flash message to the current session for type .