public function RedirectSubscriber::url_redirect_is_external in Url Redirect 8
Same name and namespace in other branches
- 8.2 src/EventSubscriber/RedirectSubscriber.php \Drupal\url_redirect\EventSubscriber\RedirectSubscriber::url_redirect_is_external()
Check for external URL.
Parameters
type $path:
Return value
type
1 call to RedirectSubscriber::url_redirect_is_external()
- RedirectSubscriber::doRedirect in src/
EventSubscriber/ RedirectSubscriber.php - Set response to redirection.
File
- src/
EventSubscriber/ RedirectSubscriber.php, line 241
Class
Namespace
Drupal\url_redirect\EventSubscriberCode
public function url_redirect_is_external($path) {
// check for http:// or https://
if (preg_match("`https?://`", $path)) {
return TRUE;
}
else {
return FALSE;
}
}