diff --git a/src/lib/MVC/Symfony/Matcher/ContentBased/IsPreview.php b/src/lib/MVC/Symfony/Matcher/ContentBased/IsPreview.php new file mode 100644 index 0000000000..18a326c7f6 --- /dev/null +++ b/src/lib/MVC/Symfony/Matcher/ContentBased/IsPreview.php @@ -0,0 +1,48 @@ +isPreview = $matchingConfig; + } + + public function match(View $view): bool + { + $isPreview = $view->hasParameter(PreviewController::PREVIEW_PARAMETER_NAME) + && $view->getParameter(PreviewController::PREVIEW_PARAMETER_NAME); + + return $this->isPreview === $isPreview; + } +}