protected function SingleLanguageNegotiationUrl::isPathExcluded in Single Language URL Prefix 8
Same name and namespace in other branches
- 2.0.x src/SingleLanguageNegotiationUrl.php \Drupal\single_language_url_prefix\SingleLanguageNegotiationUrl::isPathExcluded()
Helper function to check if current path is excluded or not.
Parameters
$path: Path to check.
Return value
bool TRUE if path is excluded.
2 calls to SingleLanguageNegotiationUrl::isPathExcluded()
- SingleLanguageNegotiationUrl::processInbound in src/
SingleLanguageNegotiationUrl.php - Processes the inbound path.
- SingleLanguageNegotiationUrl::processOutbound in src/
SingleLanguageNegotiationUrl.php - Processes the outbound path.
File
- src/
SingleLanguageNegotiationUrl.php, line 132
Class
- SingleLanguageNegotiationUrl
- Class for identifying language via URL prefix when there is single language.
Namespace
Drupal\single_language_url_prefixCode
protected function isPathExcluded($path) {
if (!isset($this->excludedPaths)) {
$config = $this->config
->get('single_language_url_prefix.settings');
$this->excludedPaths = $config
->get('excluded_paths') ?? '';
}
if (empty($this->excludedPaths)) {
return FALSE;
}
return (bool) $this->pathMatcher
->matchPath($path, $this->excludedPaths);
}