- Issue created by @lrwebks
- 🇬🇧United Kingdom jonathan1055
Hi lrwebks,
Did you see the Scheduler documentation site https://project.pages.drupalcode.org/scheduler/plugin_create/ ?
I can't tell from your comments above, but you may have seen this, as it was the result of the first part of #3249560: Write documentation for the entity plugin → which you have linked to.I'd be happy to help with questions and to update the documentation if there are specific things that are missing. If you could use those steps and note down any places where you get stuck, or it is not clear, then we can improve those pages.
Other issues on creating a plugin which may (or may not!) be helpful:
✨ Support for Block (display) entities Active
✨ Paragraph scheduler plugin Needs work
✨ Scheduler plugin for Commerce Product Variation Active - 🇩🇪Germany lrwebks Porta Westfalica
Thanks for your quick response, @jonathan1055,
indeed I was aware about the docs page that you linked, but within the list of steps there appear to be a few instructions, that seem to me like this is meant to be implemented within the Scheduler Module (like support for a module from your module's side, the way that you have done it with Commerce Product already).
Examples of what I mean:
Add extra two lines in config/schema/scheduler.schema.yml to use the saved alias for the new third party settings.
In scheduler.install add a hook_update function to load the new view.
This was the case for Media and Commerce Products (note from lrwebks: Two of the modules that scheduler supports internally, which is not what we want to achieve with our module)
Update README.md to include the new entity in the list of implementations.
Is it enough to avoid the steps which require modification of the scheduler module, for our custom plugin implementation? Or do we have to handle that differently? If so, what are the required steps?
- 🇬🇧United Kingdom jonathan1055
Thanks for pointing out those bits. Yes the doc page could do with some re-work, as you are correct - those lines are specific to internal plugins provided by scheduler. I wrote it up from my notes when making the first plugin, media, and then refined it as we added commerce_product and taxonomy_term.
Is it enough to avoid the steps which require modification of the scheduler module, for our custom plugin implementation?
In general, yes. But there may be some things that you need to do in your module instead. An example is the first on your list - you will want to have all scheduler settings available in your content type. Whether you simply copy those from the schuduler schema or somehow get them defined dynamically to avoid duplication, you can decide on how you want to tackle it.
I think we can use this issue to make some changes to the documentation, to explain when some steps are not required and when the change needs to be done in the 3rd-party module.