Skip to content

Commit

Permalink
Merge pull request #93 from marc-farre/patch-10
Browse files Browse the repository at this point in the history
Update modules-event-handler.md
  • Loading branch information
luke- authored Dec 8, 2023
2 parents d0a9cf3 + 9961f80 commit a7c1a44
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/develop/modules-event-handler.md
Original file line number Diff line number Diff line change
Expand Up @@ -611,14 +611,14 @@ return [
[
'class' => 'some\module\widget\SpecialWidget',
'event' => Widget::EVENT_CREATE,
'callback' => [Events::class, 'onSpecialWidgetBeforeRun']]
'callback' => [Events::class, 'onSpecialWidgetCreate']]
]
]
```

```php
// Events.php
public static function onSpecialWidgetBeforeRun(WidgetCreateEvent $event)
public static function onSpecialWidgetCreate(WidgetCreateEvent $event)
{
$event->config['class'] = MyCustomSpecialWidget::class;
}
Expand Down

0 comments on commit a7c1a44

Please sign in to comment.