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;
}
doc_Drupal
2016-10-29 09:45:53
Comments
Leave a Comment

Please login to continue.