You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fyi: There are some typos in the example code in the README on how to register a custom provider;
The line $event->types[] = MyProvider:class is missing both a colon and a semicolon and throws an error when using it like this. When using this here it needed to be changed into
$event->types[] = MyProvider::class;
I don't know if there are other ways of making these publicly available, but in my case, in order to make it work, I had to add the Event use too, which isn't in the example:
use yii\base\Event;
// ...
I also needed to add namespaces to reach the custom provider, but not sure if that's really required as I'm not a full time php developer and focussed on front end.
Hope this helps.
The text was updated successfully, but these errors were encountered:
Fyi: There are some typos in the example code in the README on how to register a custom provider;
The line
$event->types[] = MyProvider:class
is missing both a colon and a semicolon and throws an error when using it like this. When using this here it needed to be changed intoI don't know if there are other ways of making these publicly available, but in my case, in order to make it work, I had to add the
Event
use too, which isn't in the example:I also needed to add namespaces to reach the custom provider, but not sure if that's really required as I'm not a full time php developer and focussed on front end.
Hope this helps.
The text was updated successfully, but these errors were encountered: