From 9961f8006b99df67fac1b11b79db23985b627591 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Farr=C3=A9?= <23310825+marc-farre@users.noreply.github.com> Date: Fri, 8 Dec 2023 15:21:08 +0100 Subject: [PATCH] Update modules-event-handler.md Function name changed to match the related event type --- docs/develop/modules-event-handler.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/develop/modules-event-handler.md b/docs/develop/modules-event-handler.md index 613a5c3..31a9e3c 100644 --- a/docs/develop/modules-event-handler.md +++ b/docs/develop/modules-event-handler.md @@ -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; }