User tests: Successful: Unsuccessful:
Adding Subscriber Registration Checker. Interface that allows Plugins to be checked before listener registration.
This allows the plugin to be registered only wheen special conditions are met, eg: only for specific application.
Code review by maintainers.
Edit
joomla-cms/plugins/system/guidedtours/src/Extension/GuidedTours.php
Lines 124 to 126 in 98f3ecd
dd('Works'); at top of this method.
Then open Administrator page: you should get message "works"
And then open Site page: the page should be opened as usual
Please select:
| Status | New | ⇒ | Pending |
| Category | ⇒ | Libraries Front End Plugins |
| Title |
|
||||||
| Title |
|
||||||
| Title |
|
||||||
| Labels |
Added:
RFC
Feature
PR-5.2-dev
PR-5.3-dev
|
||
This pull request has been automatically rebased to 6.0-dev.
| Title |
|
||||||
| Labels |
Added:
PR-6.0-dev
Removed: PR-5.2-dev PR-5.3-dev |
||
This pull request has been automatically rebased to 6.1-dev.
| Title |
|
||||||
| Labels |
Added:
PR-6.1-dev
Removed: PR-6.0-dev |
||
It's a bit contra productive if the check function gets no information about where to register.
We have the situation that we might not have an own dispatcher we want the plugin to register. Or we boot the plugin for the SiteRouter in the backend (see autoredirect plugin).
I also think it should be static so it doesn't access the plugin object it self.
More might be provided to the plugin to get a qualified answer to the "should register" question.
Initially I wanted detached handler. Then service provider could be:
$container->set(PluginRegistrationChecker::class, function() {
return true/false;
});
$container->set(PluginInterface::class, function() {
// our existing code for plugin initialisation
});Then plugin helper checking for PluginRegistrationChecker first and only then for plugin.
But with current architecture it is not possible, and the checker need to be part of PluginInterface.
Also the idea that checker can access to the plugin parameters. We have plugin that can be configured to run: site/admin/both (example skipto plugin).
I set it to draft for now. Maybe later we will get a better idea.
This pull request has been automatically rebased to 5.3-dev.