PHP Class eZ\Publish\Core\MVC\Symfony\EventListener\LanguageSwitchListener

Will be triggered when generating a RouteReference.
Inheritance: implements Symfony\Component\EventDispatcher\EventSubscriberInterface
Afficher le fichier Open project: ezsystems/ezpublish-kernel Class Usage Examples

Méthodes publiques

Méthode Description
__construct ( TranslationHelper $translationHelper )
getSubscribedEvents ( )
onRouteReferenceGeneration ( RouteReferenceGenerationEvent $event ) If "language" parameter is present, will try to get corresponding SiteAccess for translation.

Method Details

__construct() public méthode

public __construct ( TranslationHelper $translationHelper )
$translationHelper eZ\Publish\Core\Helper\TranslationHelper

getSubscribedEvents() public static méthode

public static getSubscribedEvents ( )

onRouteReferenceGeneration() public méthode

If found, it will add "siteaccess" parameter to the RouteReference, to trigger SiteAccess switch when generating the final link.
See also: eZ\Publish\Core\MVC\Symfony\Routing\Generator::generate()
See also: eZ\Publish\Core\MVC\Symfony\Routing\Generator\UrlAliasGenerator::doGenerate()
public onRouteReferenceGeneration ( RouteReferenceGenerationEvent $event )
$event eZ\Publish\Core\MVC\Symfony\Event\RouteReferenceGenerationEvent