You are here

public function AnonymousRedirectSubscriber::isFrontPage in Anonymous Redirect 8.2

Returns true if the entered string matches the configured front page route.

Parameters

string $urlString: The URL to test.

Return value

bool Whether the entered string matches.

1 call to AnonymousRedirectSubscriber::isFrontPage()
AnonymousRedirectSubscriber::redirectAnonymous in src/EventSubscriber/AnonymousRedirectSubscriber.php
Redirects anonymous users to the /user route.

File

src/EventSubscriber/AnonymousRedirectSubscriber.php, line 147

Class

AnonymousRedirectSubscriber
Subscribes to kernel events and does the actual redirect.

Namespace

Drupal\anonymous_redirect\EventSubscriber

Code

public function isFrontPage($urlString) {
  if ($urlString == "<front>") {
    return TRUE;
  }
  return FALSE;
}