code: public function onPreviewUrlConvert(PreviewUrlConvertEvent $event): void
      {
          if (!$this->framework->isInitialized()) {
              return;
          }
  
          $request = $this->requestStack->getCurrentRequest();
  
          if (null === $request || null === ($eventModel = $this->getEventModel($request))) {
              return;
          }
  
          /** @var Events $eventsAdapter */
          $eventsAdapter = $this->framework->getAdapter(Events::class);
  
          $event->setUrl($request->getSchemeAndHttpHost().'/'.$eventsAdapter->generateEventUrl($eventModel));
      }
docs: Adds the front end preview URL to the event.