/**
  * Adds a message either to the BE_USER session (if the $message has the storeInSession flag set)
  * or it adds the message to self::$messages.
  *
  * @param	object 	instance of t3lib_FlashMessage, representing a message
  * @return 	void
  */
 public static function addMessage(t3lib_FlashMessage $message)
 {
     if ($message->isSessionMessage() === TRUE) {
         $queuedFlashMessages = self::getFlashMessagesFromSession();
         $queuedFlashMessages[] = $message;
         $GLOBALS['BE_USER']->setAndSaveSessionData('core.template.flashMessages', $queuedFlashMessages);
     } else {
         self::$messages[] = $message;
     }
 }
 /**
  * Adds a message either to the BE_USER session (if the $message has the storeInSession flag set)
  * or it adds the message to self::$messages.
  *
  * @param	object	 instance of t3lib_FlashMessage, representing a message
  * @return	 void
  */
 public static function addMessage(t3lib_FlashMessage $message)
 {
     if ($message->isSessionMessage()) {
         $queuedFlashMessages = self::getFlashMessagesFromSession();
         $queuedFlashMessages[] = $message;
         self::storeFlashMessagesInSession($queuedFlashMessages);
     } else {
         self::$messages[] = $message;
     }
 }