public function LanguageCookieConditionPathIsValid::evaluate in Language Cookie 8
Evaluates the condition and returns TRUE or FALSE accordingly.
Return value
bool TRUE if the condition has been met, FALSE otherwise.
Overrides LanguageCookieConditionBase::evaluate
File
- src/
Plugin/ LanguageCookieCondition/ LanguageCookieConditionPathIsValid.php, line 83
Class
- LanguageCookieConditionPathIsValid
- Class for LanguageCookieConditionPathIsValid.
Namespace
Drupal\language_cookie\Plugin\LanguageCookieConditionCode
public function evaluate() {
$path = $this->currentPath
->getPath($this->requestStack
->getCurrentRequest());
if ($this->pathValidator
->isValid($path)) {
return $this
->pass();
}
return $this
->block();
}