<?php declare(strict_types=1);
namespace MyPlugin\Subscriber;
use Momocode\MomoLoginRedirectSW6\Redirect\Event\RedirectLoginRoutesEvent;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
class RedirectLoginRoutesSubscriber implements EventSubscriberInterface
public static function getSubscribedEvents(): array
RedirectLoginRoutesEvent::class => 'onRedirectLoginRoutes',
public function onRedirectLoginRoutes(RedirectLoginRoutesEvent $event): void
$routes = $event->getLoginRoutes();
$routes[] = 'frontend.account.custom-login.page';
$event->setLoginRoutes($routes);