diff core/modules/image/src/ImageStyleListBuilder.php @ 14:1fec387a4317

Update Drupal core to 8.5.2 via Composer
author Chris Cannam
date Mon, 23 Apr 2018 09:46:53 +0100
parents 4c8ae668cc8c
children af1871eacc83
line wrap: on
line diff
--- a/core/modules/image/src/ImageStyleListBuilder.php	Mon Apr 23 09:33:26 2018 +0100
+++ b/core/modules/image/src/ImageStyleListBuilder.php	Mon Apr 23 09:46:53 2018 +0100
@@ -39,9 +39,17 @@
       'url' => $entity->urlInfo('flush-form'),
     ];
 
-    return parent::getDefaultOperations($entity) + [
+    $operations = parent::getDefaultOperations($entity) + [
       'flush' => $flush,
     ];
+
+    // Remove destination URL from the edit link to allow editing image
+    // effects.
+    if (isset($operations['edit'])) {
+      $operations['edit']['url'] = $entity->toUrl('edit-form');
+    }
+
+    return $operations;
   }
 
   /**