ModifyLanguagePackRemoteBaseUrlEvent 

Deprecated since version 14.2

The PSR-14 event \TYPO3\CMS\Core\Localization\Event\ModifyLanguagePackRemoteBaseUrlEvent allows to modify the main URL of a language pack.

Example 

EXT:my_extension/Classes/EventListener/CustomMirror.php
<?php

declare(strict_types=1);

namespace MyVendor\MyExtension\EventListener;

use TYPO3\CMS\Core\Attribute\AsEventListener;
use TYPO3\CMS\Core\Http\Uri;
use TYPO3\CMS\Install\Service\Event\ModifyLanguagePackRemoteBaseUrlEvent;

#[AsEventListener(
  identifier: 'my-extension/custom-mirror',
)]
final readonly class CustomMirror
{
  private const EXTENSION_KEY = 'my_extension';
  private const MIRROR_URL = 'https://example.org/typo3-packages/';

  public function __invoke(ModifyLanguagePackRemoteBaseUrlEvent $event): void
  {
    if ($event->getPackageKey() === self::EXTENSION_KEY) {
      $event->setBaseUrl(new Uri(self::MIRROR_URL));
    }
  }
}
Copied!

API 

class ModifyLanguagePackRemoteBaseUrlEvent
Fully qualified name
\TYPO3\CMS\Core\Localization\Event\ModifyLanguagePackRemoteBaseUrlEvent

Event to modify the main URL of a language

getBaseUrl()
Returns
PsrHttpMessageUriInterface
setBaseUrl(\Psr\Http\Message\UriInterface $baseUrl)
param $baseUrl

the baseUrl

getPackageKey()
Returns
string