Updated to Drupal 8.5. Core Media not yet in use.
[yaffs-website] / web / core / modules / image / src / ImageStyleListBuilder.php
index 62651cd2f82a1b7b1f3d84dbab17ef2ea8d0c330..2dcb800afae76b5fcb1b0a4bc777ebc9b8ace2f5 100644 (file)
@@ -39,9 +39,17 @@ class ImageStyleListBuilder extends ConfigEntityListBuilder {
       '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;
   }
 
   /**