#[Route(path: '/api/_action/seo-url-template/validate', name: 'api.seo-url-template.validate', methods: ['POST'])]
public function validate(Request
$request, Context
$context): JsonResponse
{ $context->
setConsiderInheritance(true
);
$this->
validateSeoUrlTemplate($request);
$seoUrlTemplate =
$request->request->
all();
// just call it to validate the template
$this->
getPreview($seoUrlTemplate,
$context);
return new JsonResponse();
} #[Route(path: '/api/_action/seo-url-template/preview', name: 'api.seo-url-template.preview', methods: ['POST'])]
public function preview(Request
$request, Context
$context): Response
{ $this->
validateSeoUrlTemplate($request);
$seoUrlTemplate =
$request->request->
all();
$previewCriteria =
new Criteria();