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.
For instructions on how to convert a page callback into a controller, see the WSCCI Conversion Guide.
Meta issue: #1971384: [META] Convert page callbacks to controllers
Comment | File | Size | Author |
---|---|---|---|
#14 | drupal-1983874-14.patch | 3.93 KB | dawehner |
#14 | interdiff.txt | 919 bytes | dawehner |
#12 | 1983874-convert_block_admin_add_to_controller-12.patch | 3.9 KB | vijaycs85 |
#9 | block-convert-block-admin-add-to-controller-1983874-9.patch | 3.85 KB | InternetDevels |
#9 | interdiff.txt | 3.77 KB | InternetDevels |
Comments
Comment #1
vijaycs85Comment #2
RoSk0Initial patch.
Comment #3
dawehnerYou want to use the magic in the routing definition:
With that you should be able to do everything without an extra controller.
Comment #4
RoSk0Helper http://drupal.org/node/1913618
Comment #6
InternetDevels CreditAttribution: InternetDevels commentedWe are working today with this issue during Code Sprint UA
Comment #7
InternetDevels CreditAttribution: InternetDevels commented#2: convert_block_admin_add_to_controller-1983874-2.patch queued for re-testing.
Comment #8
dawehnerIs there maybe a better name for this method/class? Please move this file into the Controller directory instead of the rootnamespace.
In a perfect world this controller would get the entity manager injected and use ->getStorageController('block')->create(...) instead of entity_create.
Comment #9
InternetDevels CreditAttribution: InternetDevels commentedHere are the fixes. Please review.
Comment #10
naxoc CreditAttribution: naxoc commented#9: block-convert-block-admin-add-to-controller-1983874-9.patch queued for re-testing.
Comment #12
vijaycs85Re-rolling...
Comment #14
dawehnerLet's fix it but also not use a global method anymore.
Comment #15
pguillard CreditAttribution: pguillard commentedComment #16
pguillard CreditAttribution: pguillard commentedIt seems ok to me!
Comment #17
pguillard CreditAttribution: pguillard commentedForgot to set rtbc
Comment #18
alexpottCommitted 54e9f29 and pushed to 8.x. Thanks!