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 |
---|---|---|---|
#13 | 1978972-13-shortcut-controller_conversion.patch | 10.13 KB | pfrenssen |
#13 | interdiff.txt | 588 bytes | pfrenssen |
#8 | 1978972-8-shortcut-controller_conversion.patch | 9.7 KB | pfrenssen |
#8 | interdiff.txt | 4.98 KB | pfrenssen |
#5 | 1978972-shortcut_link_edit-5.patch | 7.17 KB | AjitS |
Comments
Comment #1
xtfer CreditAttribution: xtfer commentedComment #2
dutchyodaComment #3
dutchyodaI created a seperate Elements file, so it can be used in both link add and link edit.
Furthermore I made the changes to make everything work by controller.
Comment #4
h3rj4n CreditAttribution: h3rj4n commentedThere should be an enter at the end (multiple).
Should be {@inheritdoc} right?
Comment #5
AjitSMade changes according to #4.
Comment #6
AjitSJust re-rolled the previous patch with the changes suggested. However, I see that the menu style for
admin/config/user-interface/shortcut/link
still needs to be changed to new routing system.Should the status be changed to "needs work"? Or will that part be taken care of in some other issue?
Comment #7
h3rj4n CreditAttribution: h3rj4n commentedNo, that should be fixed in this issue. This definitely needs work! ;)
As long as the routing.yml and the hook_menu aren't changed, none of the code of the patch is tested. So that needs to be in this patch.
Comment #8
pfrenssenI updated routing.yml and hook_menu(). The access check was identical to the one used for shortcut_link_delete, so rolled them into one.
Comment #9
pfrenssenComment #11
pfrenssen#8: 1978972-8-shortcut-controller_conversion.patch queued for re-testing.
Comment #13
pfrenssenComment #15
tim.plunkettThis needs to add/change the same code as #1978966: Convert shortcut_link_add and shortcut_link_edit to a Controller, merging them.