add() публичный статический Метод

Add a message
public static add ( string $strMessage, string $strType, string $strScope = TL_MODE )
$strMessage string The message text
$strType string The message type
$strScope string An optional message scope
Пример #1
0
 /**
  * Add a message
  *
  * @param string $strMessage The message
  * @param string $strType    The message type
  *
  * @deprecated Deprecated since Contao 4.0, to be removed in Contao 5.0.
  *             Use Message::add() instead.
  */
 protected function addMessage($strMessage, $strType)
 {
     @trigger_error('Using System::addMessage() has been deprecated and will no longer work in Contao 5.0. Use Message::add() instead.', E_USER_DEPRECATED);
     \Message::add($strMessage, $strType);
 }
 /**
  * Add a message to the contao message array in the session.
  *
  * @param AddMessageEvent $event The event.
  *
  * @return void
  */
 public function addMessage(AddMessageEvent $event)
 {
     Message::add($event->getContent(), 'TL_' . strtoupper($event->getType()));
 }