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
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Rotua Panjaitan
yii2
Commits
14be4caf
Commit
14be4caf
authored
Nov 21, 2014
by
Christopher Vrooman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update concept-events.md
Minor syntax changes.
parent
7b000f18
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
concept-events.md
docs/guide/concept-events.md
+2
-2
No files found.
docs/guide/concept-events.md
View file @
14be4caf
...
@@ -131,8 +131,8 @@ With the above code, any calls to `bar()` will trigger an event named `hello`.
...
@@ -131,8 +131,8 @@ With the above code, any calls to `bar()` will trigger an event named `hello`.
Sometimes when triggering an event you may want to pass along additional information to the event handlers.
Sometimes when triggering an event you may want to pass along additional information to the event handlers.
For example, a mailer may want pass the message information to the handlers of the
`messageSent`
event so that the handlers
For example, a mailer may want pass the message information to the handlers of the
`messageSent`
event so that the handlers
can know the particulars of the sent messages. To do so, you can provide an event object as the second parameter to
can know the particulars of the sent messages. To do so, you can provide an event object as the second parameter to
the
[
[yii\base\Component::trigger()
]
] method. The event object must be an instance of the
[
[yii\base\Event
]
] class
,
the
[
[yii\base\Component::trigger()
]
] method. The event object must be an instance of the
[
[yii\base\Event
]
] class
or
of
a child class. For example:
or a child class. For example:
```
php
```
php
namespace
app\components
;
namespace
app\components
;
...
...
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