public function LanguageSelectionPageConditionPathIsValid::evaluate in Language Selection Page 8.2
Evaluates the condition and returns TRUE or FALSE accordingly.
Return value
bool TRUE if the condition has been met, FALSE otherwise.
Overrides LanguageSelectionPageConditionBase::evaluate
File
- src/
Plugin/ LanguageSelectionPageCondition/ LanguageSelectionPageConditionPathIsValid.php, line 87
Class
- LanguageSelectionPageConditionPathIsValid
- Class for LanguageSelectionPageConditionPathIsValid.
Namespace
Drupal\language_selection_page\Plugin\LanguageSelectionPageConditionCode
public function evaluate() {
$path = $this->currentPath
->getPath($this->requestStack
->getCurrentRequest());
if ($this->pathValidator
->isValid($path)) {
return $this
->pass();
}
return $this
->block();
}