The README.md has a few code blocks which contain (I believe) wrong examples. The Event implements the interface EventSchedulerInterface
, but it should be the EventScheduleInterface
. So copy and paste from the documentation results in errors and with an IDE to wrong imports.
Calling \Drupal::service('')->dispatch() .. I guess is also a first draft line, which needs the actual scheduler key added. ('event_scheduler.scheduler'?)
Further: In the event example there is static NAME = 'foobar';
Even though I use PHP 7.4 my IDE. I guess it should be const NAME
.
Also: Symfony and even Drupal have switched the dispatch() arguments. Therefore first the Event Object, 2nd the event name. It would be great to have that here too.
In the README.md also the $event->initialise(MyEvent::NAME, ...
is wrong, because you seemed to have removed the first argument.
Active
2.1
Documentation
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.