You are here

public function HiddenLanguageManager::isRouteExcecption in Hidden Language 2.x

Check if url route name existis in the exception list.

Parameters

string $url: Url to be tested.

Return value

bool True if url route name existis in exception list and False if not.

1 call to HiddenLanguageManager::isRouteExcecption()
HiddenLanguageManager::isUrlException in src/HiddenLanguageManager.php
Verify if $url is an exception on the hidden language config.

File

src/HiddenLanguageManager.php, line 72

Class

HiddenLanguageManager
Class HiddenLanguageManager.

Namespace

Drupal\hidden_language

Code

public function isRouteExcecption($url) {
  if (!is_array($this
    ->getRoutesException())) {
    return FALSE;
  }
  $url_object = $this->pathValidator
    ->getUrlIfValidWithoutAccessCheck($url);
  if (!$url_object) {
    return FALSE;
  }
  $route_name = $url_object
    ->getRouteName();
  return array_key_exists($route_name, array_flip($this
    ->getRoutesException()));
}