Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. OpenModalDialogWithUrl.php

function OpenModalDialogWithUrl::getBaseUrl

Gets the complete base URL.

1 call to OpenModalDialogWithUrl::getBaseUrl()
OpenModalDialogWithUrl::render in core/lib/Drupal/Core/Ajax/OpenModalDialogWithUrl.php
Return an array to be run through json_encode and sent to the client.

File

core/lib/Drupal/Core/Ajax/OpenModalDialogWithUrl.php, line 52

Class

OpenModalDialogWithUrl
Provides an AJAX command for opening a modal with URL.

Namespace

Drupal\Core\Ajax

Code

private function getBaseUrl() {
    $requestContext = \Drupal::service('router.request_context');
    return $requestContext->getCompleteBaseUrl();
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal