Commit 1eaf8e63 authored by alexpott's avatar alexpott

Issue #3054392 by iuana, joachim: protected methods in...

Issue #3054392 by iuana, joachim: protected methods in LocalAwareRedirectResponseTrait are missing docs
parent 1ffbb8eb
......@@ -17,7 +17,14 @@ trait LocalAwareRedirectResponseTrait {
protected $requestContext;
/**
* {@inheritdoc}
* Determines whether a path is local.
*
* @param string $url
* The internal path or external URL being linked to, such as "node/34" or
* "http://example.com/foo".
*
* @return bool
* TRUE or FALSE, where TRUE indicates a local path.
*/
protected function isLocal($url) {
return !UrlHelper::isExternal($url) || UrlHelper::externalIsLocal($url, $this->getRequestContext()->getCompleteBaseUrl());
......@@ -27,6 +34,7 @@ protected function isLocal($url) {
* Returns the request context.
*
* @return \Drupal\Core\Routing\RequestContext
* The request context.
*/
protected function getRequestContext() {
if (!isset($this->requestContext)) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment