function _shurly_get_shurly_base in ShURLy 8
Return the base url used for the shortlinks.
Return value
string
6 calls to _shurly_get_shurly_base()
- ShurlyCreateForm::buildForm in src/
Form/ ShurlyCreateForm.php - Form constructor.
- ShurlyCreateForm::submitAjaxCall in src/
Form/ ShurlyCreateForm.php - ShurlyCreateForm::validateForm in src/
Form/ ShurlyCreateForm.php - Form validation handler.
- ShurlySettingsForm::buildForm in src/
Form/ ShurlySettingsForm.php - Form constructor.
- _sl in ./
shurly.module - Internal function to generate a link without language prefixing or subdomain rewrites
File
- ./
shurly.module, line 643 - Description http://www.youtube.com/watch?v=Qo7qoonzTCE.
Code
function _shurly_get_shurly_base() {
$shurly_base = trim(\Drupal::config('shurly.settings')
->get('shurly_base'));
if (empty($shurly_base)) {
$shurly_base = \Drupal::request()
->getSchemeAndHttpHost();
}
return $shurly_base;
}