W3cubDocs

/Drupal 8

function system_authorized_get_url

system_authorized_get_url(array $options = array())

Return the URL for the authorize.php script.

Parameters

array $options: Optional array of options to set on the \Drupal\Core\Url object.

Return value

\Drupal\Core\Url The full URL to authorize.php, using HTTPS if available.

See also

system_authorized_init()

Related topics

Authorized operations
Functions to run operations with elevated privileges via authorize.php.

File

core/modules/system/system.module, line 449
Configuration system that lets administrators modify the workings of the site.

Code

function system_authorized_get_url(array $options = array()) {
  // core/authorize.php is an unrouted URL, so using the base: scheme is
  // the correct usage for this case.
  $url = Url::fromUri('base:core/authorize.php');
  $url_options = $url->getOptions();
  $url->setOptions($options + $url_options);
  return $url;
}

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!modules!system!system.module/function/system_authorized_get_url/8.1.x