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.

Files: 
CommentFileSizeAuthor
#6 layout_test_controller-1985570-6.patch4.28 KBplopesc
PASSED: [[SimpleTest]]: [MySQL] 55,878 pass(es).
[ View ]
#6 interdiff.txt684 bytesplopesc
#3 layout_test_controller-1985570-3.patch4.27 KBplopesc
PASSED: [[SimpleTest]]: [MySQL] 56,657 pass(es).
[ View ]
#3 interdiff.txt844 bytesplopesc
#1 layout_test_controller-1985570-1.patch3.28 KBplopesc
PASSED: [[SimpleTest]]: [MySQL] 55,525 pass(es).
[ View ]

Comments

plopesc’s picture

Assigned:Unassigned» plopesc
Status:Active» Needs review
StatusFileSize
new3.28 KB
PASSED: [[SimpleTest]]: [MySQL] 55,525 pass(es).
[ View ]

Hello.

Attaching patch that converts layout_test_page() to a Controller.

Regards

dawehner’s picture

+++ b/core/modules/layout/tests/lib/Drupal/layout_test/Controller/LayoutTestController.phpundefined
@@ -0,0 +1,42 @@
+    $display = entity_load('display', 'test_twocol');

entityLoad could be replayed by an injected entity storage controller.

plopesc’s picture

StatusFileSize
new844 bytes
new4.27 KB
PASSED: [[SimpleTest]]: [MySQL] 56,657 pass(es).
[ View ]

Re-rolled patch injecting entity storage controller.

Maybe theme_enable hack could be replaced because uses internally some configuration system dependencies.

What do you think?

Regards.

dawehner’s picture

He, you interdiffs seems to be out of scope somehow.

+++ b/core/modules/layout/tests/lib/Drupal/layout_test/Controller/LayoutTestController.phpundefined
@@ -0,0 +1,70 @@
+   * Page callback for layout testing.

Do we have a better description then "page callback"? This seems very D7-ish.

dawehner’s picture

Status:Needs review» Needs work
plopesc’s picture

Status:Needs work» Needs review
StatusFileSize
new684 bytes
new4.28 KB
PASSED: [[SimpleTest]]: [MySQL] 55,878 pass(es).
[ View ]

Sorry, I forgot to change the docblock.

Re-rolling patch.

Regards.

dawehner’s picture

Status:Needs review» Reviewed & tested by the community

Thank you

alexpott’s picture

Status:Reviewed & tested by the community» Fixed

Committed 8e7ead4 and pushed to 8.x. Thanks!

Automatically closed -- issue fixed for 2 weeks with no activity.