public function LanguageSelectionPageConditionIndexPhp::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/ LanguageSelectionPageConditionIndexPhp.php, line 37
Class
- LanguageSelectionPageConditionIndexPhp
- Class for the Index.php condition plugin.
Namespace
Drupal\language_selection_page\Plugin\LanguageSelectionPageConditionCode
public function evaluate() {
if ($_SERVER['SCRIPT_NAME'] !== base_path() . 'index.php') {
return $this
->block();
}
return $this
->pass();
}