{JA} - 3.5.3.2.2 flash

flash(string $message, string $url, integer $pause)
  1. flash(string $message, string $url, integer $pause)

flash() メソッドも、ページ遷移に使用します。 flash() メソッドでは、別の URL へ移る前にメッセージを表示するところが redirect() メソッドと異なります。

第1引数は、表示するメッセージです。そして、第2引数は、CakePHP 流の相対 URL です。CakePHP は、$pause (第3引数) 秒間、メッセージを表示ます。

ページ遷移後のメッセージ表示については、SessionComponent クラスの setFlash() メソッドを参照ください。

{EN} - 3.5.3.2.2 flash

flash(string $message, string $url, integer $pause)

Similarly, the flash() method is used to direct a user to a new page after an operation. The flash() method is different in that it shows a message before passing the user on to another URL.

The first parameter should hold the message to be displayed, and the second parameter is a CakePHP-relative URL. CakePHP will display the $message for $pause seconds before forwarding the user on.

For in-page flash messages, be sure to check out SessionComponent’s setFlash() method.

Differences

Lines: 1-5Lines: 1-5
 <title>flash</title> <title>flash</title>
-<p class="method"><code>flash(string $message, string $url, integer $pause)</code></p>
<p>Similarly, the flash() method is used to direct a user to a new page after an operation. The flash() method is different in that it shows a message before passing the user on to another URL.</p>
<p>The first parameter should hold the message to be displayed, and the second parameter is a CakePHP-relative URL. CakePHP will display the $message for $pause seconds before forwarding the user on.</p>
<p>For in-page flash messages, be sure to check out SessionComponent’s setFlash() method.</p>
+<pre>flash(string $message, string $url, integer $pause)</pre>
<p>flash() メソッドも、ページ遷移に使用します。 flash() メソッドでは、別の URL へ移る前にメッセージを表示するところが redirect() メソッドと異なります。 </p>
<p>第1引数は、表示するメッセージです。そして、第2引数は、CakePHP 流の相対 URL です。CakePHP は、$pause (第3引数) 秒間、メッセージを表示ます。 </p>
<p>ページ遷移後のメッセージ表示については、SessionComponent クラスの setFlash() メソッドを参照ください。</p>