original_string: 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);
      }
code: 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);
      }
code_tokens: 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 ) ; }
docstring: Adds a flash message to the current session for type.
  
  @throws \LogicException
  
  @final
docstring_tokens: Adds a flash message to the current session for type .