You are here

public function CookieHelper::hasCookie in Persistent Login 8

Checks if a request contains a persistent login cookie.

Parameters

\Symfony\Component\HttpFoundation\Request $request: The request.

Return value

bool TRUE if the request provides a persistent login cookie.

Overrides CookieHelperInterface::hasCookie

File

src/CookieHelper.php, line 73

Class

CookieHelper
Cookie helper service.

Namespace

Drupal\persistent_login

Code

public function hasCookie(Request $request) {
  return $request->cookies
    ->has($this
    ->getCookieName($request));
}