You are here

public static function TomeStaticHelper::restoreBaseUrl in Tome 8

Restores the base URL for a request.

Parameters

\Symfony\Component\HttpFoundation\Request $request: The request.

array $original_params: The return value of ::setBaseUrl.

4 calls to TomeStaticHelper::restoreBaseUrl()
StaticGeneratorForm::exportPath in modules/tome_static/src/Form/StaticGeneratorForm.php
Exports a path using Tome.
StaticGeneratorForm::submitForm in modules/tome_static/src/Form/StaticGeneratorForm.php
Form submission handler.
TomeStaticQueueWorker::processItem in modules/tome_static/modules/tome_static_cron/src/Plugin/QueueWorker/TomeStaticQueueWorker.php
Works on a single queue item.
tome_static_cron_cron in modules/tome_static/modules/tome_static_cron/tome_static_cron.module
Implements hook_cron().

File

modules/tome_static/src/TomeStaticHelper.php, line 61

Class

TomeStaticHelper
Provides helpers for the Tome Static module.

Namespace

Drupal\tome_static

Code

public static function restoreBaseUrl(Request $request, array $original_params) {
  $request->server
    ->replace($original_params['server']);
  $request->headers
    ->replace($original_params['headers']);
}