Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Move block implementation outside, in a optional module (qr_codes_block.module) to keep the main module as very lightweight "only API" module.
Comment | File | Size | Author |
---|---|---|---|
#5 | qr_codes_block_extracted.patch | 6.39 KB | IncrediblyKenzi |
Comments
Comment #1
levelos CreditAttribution: levelos commentedIMHO, I think it would be a stretch to create a separate module that only implements a block, and removing the block completely increases the usage barrier for non developers. Postponing until all decide what else should go into any sub-modules.
Comment #2
IncrediblyKenzi CreditAttribution: IncrediblyKenzi commentedI *think* what's intended here is to module_load_include the block contents from within hook_block, so that the whole module isn't loaded when the block isn't needed. Does that make sense?
Comment #3
levelos CreditAttribution: levelos commentedSeems like a good compromise. Resetting to active.
Comment #4
claudiu.cristea+1 if this solves avoiding loading of block code on a simple usage of the module.
Comment #5
IncrediblyKenzi CreditAttribution: IncrediblyKenzi commentedHere's a patch. Ready for review.
Comment #6
IncrediblyKenzi CreditAttribution: IncrediblyKenzi commentedsetting to "needs review"
Comment #7
levelos CreditAttribution: levelos commentedWorks well and looks good. Happy to wait a bit for claudiu.cristea to chime in or commit when ready.
Comment #8
claudiu.cristea+1 for RTBC
Comment #9
IncrediblyKenzi CreditAttribution: IncrediblyKenzi commentedCommitted to dev branch.