Add Plugin Builder to JCB #436
Labels
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: joomla/Component-Builder#436
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Steps to reproduce the issue
I want to add the option to build plugins related or linked to components in JCB
Expected result
That you in JCB can map a fully functional plugins
Actual result
Feature Request.
Additional comments
It will be able to target any event in any plugin group, and when compiling the component it will also compile the plugin and auto generate a combined package.
Should you have some ideas, please share them here!
With regards to the plugins i would like to suggest few ideas. I am pretty sure you already planned them but just to outline them here:
To add a plugin to component you will go to JCB -> Joomla Components -> Plugins tab. Plugin selection to be similar to the Site and Admin views.
Plugin name convention seems tricky and you might want to add plg_[component]_pluginname so just in case you will not overwrite something with the same name.
When creating the plugin to be able to add fields to it. There is a learning curve for us here.
Maybe radio button to select from plugin types that are already available in the joomla instance (i.e. authentication, installer etc.) or select custom type - then the name will have to be in relation to whatever type the developer will need.
Sounds good... I have already build a few new views for the JCB component that will be used to build a plugin, and yes I do cover all of those things you mentioned and more.
Again like the admin and site views... the plugin is build so that it also has fields that load from other tables so the developer can add his own to expand the available options. So some of these are:
The functions in each plugin, the plugin groups, the plugin class to inherit from... and more. So I am trying to make it as open and liberal as possible to reach as much possible use case.
This whole idea is also going to expand into the actual improvement of the JCB compiler to give you the developer/user of JCB the option to change improve (for Joomla 4) and add your own MVC for components. So the plugin feature will serve as a pilot for the idea of having all the code in the GUI, not just the custom code.
But okay... I should have something ready to look at soon 👍
reuse opportunity https://github.com/joomla-extensions/boilerplate
Okay the first stage of the plugin option has been added, I am not sure if we should ship with the boilerplate, or just give good tutorial of how to load the plugin boilerplate data.
So for your viewing when you open the Joomla Plugins area in JCB there is a button called
Get Boilerplate
this will then pull the latest boilerplate code from the following repo. Then once you create a Joomla Plugin, you should see some dynamic behavior that loads the correct values in their relationships. I am planning to still add some more options, so please once you have seen what was done so far, give me feedback and suggestions.The note will explain to you that the connection between components->pluings->compiler has not yet been made. So this is just to see the GUI... and asking is it going to work?
Yes I will get a better icon... just now saw it is still FedEx boxes... lol
Okay at this point the plugins are being build (you can link many to one component), but still not yet added to the package or zipped. That is the next step I am working on. Please run some test and let me know.
To link plugins in the Joomla Component List view there is a new icon that looks like a plug... that is how you link them.
This is a major issue that involves many places all over JCB to change... since it needs to be added to the import and export of JCB packages... really a big deal actually. I am just very relieved that we added it to JCB instead of building a new component since JCB makes is so much easier with all its conventions and mostly the power of the compiler... even I am amazed a how little I need to add to make this work.
Just a heads-up the plugin being build is left in the compiler folder in the admin area of JCB.