Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yii2
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
PSDI Army
yii2
Commits
9a42ad67
Commit
9a42ad67
authored
Sep 30, 2014
by
Alexander Makarov
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #5256 from nkovacs/patch-1
[skip ci] Update documentation to mention addFlash
parents
b672b818
f41abf91
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
2 deletions
+10
-2
Session.php
framework/web/Session.php
+10
-2
No files found.
framework/web/Session.php
View file @
9a42ad67
...
...
@@ -625,8 +625,9 @@ class Session extends Component implements \IteratorAggregate, \ArrayAccess, \Co
* @param mixed $defaultValue value to be returned if the flash message does not exist.
* @param boolean $delete whether to delete this flash message right after this method is called.
* If false, the flash message will be automatically deleted in the next request.
* @return mixed the flash message
* @return mixed the flash message
or an array of messages if addFlash was used
* @see setFlash()
* @see addFlash()
* @see hasFlash()
* @see getAllFlashes()
* @see removeFlash()
...
...
@@ -664,13 +665,16 @@ class Session extends Component implements \IteratorAggregate, \ArrayAccess, \Co
*
* With the above code you can use the [bootstrap alert][] classes such as `success`, `info`, `danger`
* as the flash message key to influence the color of the div.
*
* Note that if you use [[addFlash()]], `$message` will be an array, and you will have to adjust the above code.
*
* [bootstrap alert]: http://getbootstrap.com/components/#alerts
*
* @param boolean $delete whether to delete the flash messages right after this method is called.
* If false, the flash messages will be automatically deleted in the next request.
* @return array flash messages (key => message).
* @return array flash messages (key => message
or key => [message1, message2]
).
* @see setFlash()
* @see addFlash()
* @see getFlash()
* @see hasFlash()
* @see removeFlash()
...
...
@@ -712,6 +716,7 @@ class Session extends Component implements \IteratorAggregate, \ArrayAccess, \Co
* regardless if it is accessed or not. If true (default value), the flash message will remain until after
* it is accessed.
* @see getFlash()
* @see addFlash()
* @see removeFlash()
*/
public
function
setFlash
(
$key
,
$value
=
true
,
$removeAfterAccess
=
true
)
...
...
@@ -732,6 +737,7 @@ class Session extends Component implements \IteratorAggregate, \ArrayAccess, \Co
* regardless if it is accessed or not. If true (default value), the flash message will remain until after
* it is accessed.
* @see getFlash()
* @see setFlash()
* @see removeFlash()
*/
public
function
addFlash
(
$key
,
$value
=
true
,
$removeAfterAccess
=
true
)
...
...
@@ -758,6 +764,7 @@ class Session extends Component implements \IteratorAggregate, \ArrayAccess, \Co
* @return mixed the removed flash message. Null if the flash message does not exist.
* @see getFlash()
* @see setFlash()
* @see addFlash()
* @see removeAllFlashes()
*/
public
function
removeFlash
(
$key
)
...
...
@@ -777,6 +784,7 @@ class Session extends Component implements \IteratorAggregate, \ArrayAccess, \Co
* by this method.
* @see getFlash()
* @see setFlash()
* @see addFlash()
* @see removeFlash()
*/
public
function
removeAllFlashes
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment