+++ b/core/modules/trash/src/Controller/TrashDeleteController.php
@@ -0,0 +1,126 @@
+    return $this->redirect($this->getRedirectUrl($entity)
+      ->getRouteName(), $this->getRedirectUrl($entity)->getRouteParameters());
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

naveenvalecha created an issue. See original summary.

naveenvalecha’s picture

Title: Fix the starge formatting in TrashDeleteController » Fix the strange formatting in TrashDeleteController
naveenvalecha’s picture

Issue tags: +Novice
sneha_surve’s picture

Assigned: Unassigned » sneha_surve
sneha_surve’s picture

Assigned: sneha_surve » Unassigned
Status: Active » Needs review
FileSize
599 bytes

Formatting changed.
Thanks!

timmillwood’s picture

+++ b/src/Controller/TrashDeleteController.php
@@ -118,8 +118,7 @@ class TrashDeleteController extends ControllerBase {
+    return $this->redirect($this->getRedirectUrl($entity)->getRouteName(), $this->getRedirectUrl($entity)->getRouteParameters());

I'm not sure if this was the intended fix for the strange formatting. My thought was to set getRedirectUrl to a variable, then use that, rather than calling it twice.

naveenvalecha’s picture

Status: Needs review » Needs work

#6 +1

sneha_surve’s picture

Status: Needs work » Needs review
FileSize
999 bytes

changes made as said in #6

timmillwood’s picture

+++ b/src/Controller/TrashDeleteController.php
@@ -100,7 +100,7 @@ class TrashDeleteController extends ControllerBase {
+    $redirect_url = $this->getRedirectUrl($entity);

Why is the variable set to high up in the file? Wouldn't it be better on the line above where it's used?

naveenvalecha’s picture

FileSize
643 bytes
sneha_surve’s picture

changes done as said in #9.
Thanks! :)

timmillwood’s picture

Status: Needs review » Fixed

Thanks!

Status: Fixed » Closed (fixed)

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