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.
Part of #1971384: [META] Convert page callbacks to controllers
For instructions on how to convert a page callback into a controller, see the WSCCI Conversion Guide.
Comment | File | Size | Author |
---|---|---|---|
#16 | help_controller-1979028-16.patch | 5.54 KB | plopesc |
#16 | interdiff.txt | 607 bytes | plopesc |
#14 | help_controller-1979028-14.patch | 5.54 KB | plopesc |
#14 | interdiff.txt | 1.76 KB | plopesc |
#12 | help_controller-1979028-12.patch | 3.79 KB | plopesc |
Comments
Comment #1
plopescHello
Attaching patch that converts help_main() to a Controller.
Regards
Comment #2
frobComment #3
frobThe patch applied cleanly. Patch 1 didn't change the original hook_menu to use 'route_name'.
Rerolled patch should fix that.
Comment #4
frobComment #5
plopescNice catch @frob, I forgot to include help.module changes in my previous patch.
Re-rolling patch indenting doc and removing unused
__construct()
method in HelpController class.Regards
Comment #6
dawehnerBoth module_implements and module_invoke could be replaced by the module handler: 'module_handler' which is in the container.
Comment #7
plopescYeah! go for it!
Comment #8
plopescRe-rolling patch using the module handler.
Thank you.
Comment #9
dawehnerThis should use the interface and could get some documentation on the object.
Should be @return string
You should have an empty line before the last } of the class.
Comment #10
plopescRe-rolling patch according to last advices.
@dawehner Thanks for your efforts.
Comment #11
dawehnerBeside from these two small things, this is ready to fly!
No need for file anymore. sorry I should have seen this before.
:( Should be ModuleHandlerInterface
Comment #12
plopescNo worries, here is the definitive patch, I hope :)
Regards.
Comment #13
dawehnerOh, is there a reason why you don't remove the previous code?
Comment #14
plopescOh sorry, it was a regression generating patches.
Re-rolling...
Comment #15
dawehnerUrgs. Drupal just uses proctected
Comment #16
plopescRe-rolling changing function definition.
Comment #17
dawehnerWe should certainly open a follow up to convert this into a themable function.
Comment #18
plopescYeah, a follow up issue for clean the way the output is generated could be a good option.
Then, we could mark as RTBC this issue if you consider it and open a follow up taking as base this code once it will be committed.
What do you think?
Regards.
Comment #19
dawehnerSounds like a great plan.
Comment #20
alexpottCommitted 51dc76b and pushed to 8.x. Thanks!
Comment #21
plopescFollow-up issue created: #1986164: Improve the way main help page is rendered
Regards.