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 |
---|---|---|---|
#15 | drupal8.theme_test_alter.1987592-15.patch | 3.5 KB | disasm |
#15 | interdiff.txt | 1.08 KB | disasm |
#10 | drupal8.theme_test.1987592-10.patch | 5.18 KB | disasm |
#10 | interdiff.txt | 1.3 KB | disasm |
#8 | drupal8.theme_test.1987592-8.patch | 3.29 KB | disasm |
Comments
Comment #1
vijaycs85Need to rewrite the whole module to make test sync with current test implementation. For more details, please refer: #1988802: [META] Rewrite test modules in system to provide better unit testing.
Comment #2
ayelet_Cr CreditAttribution: ayelet_Cr commentedComment #3
mparker17I will help!
Comment #4
mparker17Try this...
Comment #5
dawehnerIf the ThemeTestController would extend the ControllBase you could replace drupal_alter easily by $this->moduleHandler()->alter
We can't drop it yet, because there is none replacement for 'theme callback' yet.
Comment #6
mparker17Try this...
Comment #7
mparker17Comment #8
disasm CreditAttribution: disasm commentedWas rerolling for ContainerInjectionInterface, but the class isn't injecting anything, so removed create() and just extending ControllerBase now.
Comment #9
dawehnerLet's make it public and add a @return statement.
Comment #10
disasm CreditAttribution: disasm commentedMaking function public and adding @return to all methods.
Comment #12
disasm CreditAttribution: disasm commented#10: drupal8.theme_test.1987592-10.patch queued for re-testing.
Comment #13
dawehnerWell, technically this is not a menu callback anymore, so maybe call it" Returns a theme template that overrides a theme function."
Comment #15
disasm CreditAttribution: disasm commentedlast two patches combined a couple issues. This one fixes docs and goes back to what we had at last passing run.
Comment #16
dawehnerWhat about @return string\n Returns a string containing the altered data.
Let's put public in wrong
Does it make sense to copy the title from the hook_menu bit to the .routing.yml bit?
Comment #17
disasm CreditAttribution: disasm commentedI wrapped this into #1987870: Convert theme_test callbacks to a new style controller.
Comment #18
disasm CreditAttribution: disasm commented