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.
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.