Add query tags to let other modules alter the SchedulerManager queries.
The alter hooks can be used to change the list of ids, but they would require new query executions. In many cases it is enough to alter the SchedulerManager's queries.
| Comment | File | Size | Author |
|---|
Issue fork scheduler-3360744
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
aludescher commentedComment #3
aludescher commentedComment #5
jonathan1055 commentedThanks aludescher, this looks useful. I have converted your patch into an MR.
Do you have some examples where you have used these tags, to modify the queries?
It will need test coverage too. Let's see if we can re-use one of the existing test modules.
Comment #7
jonathan1055 commentedThis is working well. I have read through the examples found in api/drupal/core/lib/Drupal/Core/Database/database.api.php/function/hook_query_TAG_alter/10 and can add some tests.
I have a question - you have added four tags:
and these resolve to
I'm not sure why we need the third tag, the one using $plugin->getPluginId(), as that does not give any extra flexibility that the $entityTypId does not provide. Or maybe I have missed something?
Comment #8
jonathan1055 commentedAs expected, the new tests fail (see MR pipeline) in two different places, due to only adding one publish tag, and no unpublish tags
Now adding the remaining tags. Should all pass.
Comment #10
jonathan1055 commentedThis is a good addition. Thanks aludescher for providing the initial patch.
Committed to 2.x