Wire::message PHP Method

message() public method

This method automatically identifies the message as coming from this class.
public message ( string | array | Wire $text, integer | boolean $flags )
$text string | array | Wire
$flags integer | boolean See Notices::flags or specify TRUE to have the message also logged to messages.txt
    public function message($text, $flags = 0)
    {
        return $this->_notice($text, $flags, 'messages', 'NoticeMessage');
    }

Usage Example

Ejemplo n.º 1
0
 /**
  * Record an informational or 'success' message in the message log (messages.txt)
  *
  * @param string $text Message to log
  * @param bool|int $flags Specify boolean true to also have the message displayed interactively (admin only).
  * @return $this
  *
  */
 public function message($text, $flags = 0)
 {
     $flags = $flags === true ? Notice::log : $flags | Notice::logOnly;
     return parent::message($text, $flags);
 }