From 0015a253bee0ec21454b3e98bebc82370d2f599e Mon Sep 17 00:00:00 2001 From: Zach Garwood Date: Wed, 5 Feb 2025 10:41:48 -0600 Subject: [PATCH] Create a `ModuleController::setPreviewView()` method --- src/Http/Controllers/Admin/ModuleController.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) 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. */