mirror of
https://github.com/yiisoft/yii2.git
synced 2025-08-26 06:15:19 +08:00
Global DOCS update: ~~~ replaced with ```
This commit is contained in:
@ -60,11 +60,11 @@ class Event extends Object
|
||||
* For example, the following code attaches an event handler to `ActiveRecord`'s
|
||||
* `afterInsert` event:
|
||||
*
|
||||
* ~~~
|
||||
* ```php
|
||||
* Event::on(ActiveRecord::className(), ActiveRecord::EVENT_AFTER_INSERT, function ($event) {
|
||||
* Yii::trace(get_class($event->sender) . ' is inserted.');
|
||||
* });
|
||||
* ~~~
|
||||
* ```
|
||||
*
|
||||
* The handler will be invoked for EVERY successful ActiveRecord insertion.
|
||||
*
|
||||
|
Reference in New Issue
Block a user