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.
Convert the form builder "views_test_data_element_form" to a new-style Controller, using the instructions in the WSCCI Conversion Guide.
@see views_test_data_menu() in core/modules/views/tests/views_test_data/views_test_data.module
Comment | File | Size | Author |
---|---|---|---|
#5 | controller-1979034-5.patch | 2.97 KB | plopesc |
#5 | interdiff.txt | 844 bytes | plopesc |
#3 | controller-1979034-3.patch | 2.79 KB | plopesc |
#3 | interdiff.txt | 1.97 KB | plopesc |
#1 | controller-1979034-1.patch | 3.24 KB | plopesc |
Comments
Comment #1
plopescHello
Attaching patch that converts views_test_data_element_form() to a Controller.
Regards.
Comment #2
dawehnerThis documentation does not match with the namespace.
Should we implement the ControllerInterface if nothing is injected?
These lines could all just use {@inheritdoc}
Missing empty line.
Comment #3
plopescRe-rolling patch following @dawehner advices.
Regards.
Comment #4
dawehnerI wouldn't be 100% sure, but have you tried to remove the hook_menu as well? I don't think that the menu link is used.
The test you need to run is "'View element'" in the "Views" group.
Comment #5
plopescI didn't remove the hook_menu implementation because it was previously a menu item instead of a menu callback. I just only converted form page to Controler.
I've removed the entire hook_menu implementation and views module tests still working in my local environment. Then, re-rolling patch as menu callback.
Regards.
Comment #6
dawehnerNice!
Comment #7
alexpottCommitted bb2cdb2 and pushed to 8.x. Thanks!
Comment #8.0
(not verified) CreditAttribution: commentedUpdated issue summary.