Repository: area17/twill (language: php)

Issue:
Add missing `setPreviewView()` setter to `ModuleController`
## Summary

It seems that most properties on `ModuleController` have setters, making it easy to set properties in the `setUpController()` method. However, the `$previewView` property is lacking its own setter.

## Describe the solution you'd like

Create a `ModuleController::setPreviewView()` setter.


Discussion / hints:

Fix patch:
diff --git a/src/Http/Controllers/Admin/ModuleController.php b/src/Http/Controllers/Admin/ModuleController.php
index 3344ca50c..0dd0a3fcb 100644
--- a/src/Http/Controllers/Admin/ModuleController.php
+++ b/src/Http/Controllers/Admin/ModuleController.php
@@ -332,6 +332,10 @@ abstract class ModuleController extends Controller
     protected $viewPrefix;
 
     /**
+     * The template to use for previewing.
+     *
+     * Do not modify this directly but use the method setPreviewView().
+     *
      * @var string
      */
     protected $previewView;
@@ -748,6 +752,14 @@ protected function setBreadcrumbs(Breadcrumbs $breadcrumbs): void
         $this->breadcrumbs = $breadcrumbs;
     }
 
+    /**
+     * Set the template for the preview view.
+     */
+    protected function setPreviewView(string $previewView): void
+    {
+        $this->previewView = $previewView;
+    }
+
     /**
      * $type can be index or browser.
      */


Test patch: