private function DisabledLanguagesEventSubscriber::isPathExcluded in Disable language 8
Check if the path belong to the list of excluded ones.
Return value
bool Whether or not the requested path being accessed is excluded.
Throws
\Drupal\Component\Plugin\Exception\PluginException
\Drupal\Core\Executable\ExecutableException
1 call to DisabledLanguagesEventSubscriber::isPathExcluded()
File
- src/
EventSubscriber/ DisabledLanguagesEventSubscriber.php, line 159
Class
- DisabledLanguagesEventSubscriber
- Subscribe to KernelEvents::REQUEST events.
Namespace
Drupal\disable_language\EventSubscriberCode
private function isPathExcluded() {
if (($excluded_path_config = $this->config
->get('exclude_request_path')) && !empty($excluded_path_config['pages'])) {
/** @var \Drupal\system\Plugin\Condition\RequestPath $condition */
$condition = $this->conditionManager
->createInstance('request_path');
$condition
->setConfiguration($excluded_path_config);
return $this->conditionManager
->execute($condition);
}
return FALSE;
}