private function AlternativeFrontpageSettings::isAllowedPath in Open Social 8
Same name and namespace in other branches
- 8.9 modules/custom/alternative_frontpage/src/Form/AlternativeFrontpageSettings.php \Drupal\alternative_frontpage\Form\AlternativeFrontpageSettings::isAllowedPath()
- 8.2 modules/custom/alternative_frontpage/src/Form/AlternativeFrontpageSettings.php \Drupal\alternative_frontpage\Form\AlternativeFrontpageSettings::isAllowedPath()
- 8.3 modules/custom/alternative_frontpage/src/Form/AlternativeFrontpageSettings.php \Drupal\alternative_frontpage\Form\AlternativeFrontpageSettings::isAllowedPath()
- 8.4 modules/custom/alternative_frontpage/src/Form/AlternativeFrontpageSettings.php \Drupal\alternative_frontpage\Form\AlternativeFrontpageSettings::isAllowedPath()
- 8.5 modules/custom/alternative_frontpage/src/Form/AlternativeFrontpageSettings.php \Drupal\alternative_frontpage\Form\AlternativeFrontpageSettings::isAllowedPath()
- 8.6 modules/custom/alternative_frontpage/src/Form/AlternativeFrontpageSettings.php \Drupal\alternative_frontpage\Form\AlternativeFrontpageSettings::isAllowedPath()
- 8.7 modules/custom/alternative_frontpage/src/Form/AlternativeFrontpageSettings.php \Drupal\alternative_frontpage\Form\AlternativeFrontpageSettings::isAllowedPath()
- 8.8 modules/custom/alternative_frontpage/src/Form/AlternativeFrontpageSettings.php \Drupal\alternative_frontpage\Form\AlternativeFrontpageSettings::isAllowedPath()
- 10.3.x modules/custom/alternative_frontpage/src/Form/AlternativeFrontpageSettings.php \Drupal\alternative_frontpage\Form\AlternativeFrontpageSettings::isAllowedPath()
- 10.0.x modules/custom/alternative_frontpage/src/Form/AlternativeFrontpageSettings.php \Drupal\alternative_frontpage\Form\AlternativeFrontpageSettings::isAllowedPath()
- 10.1.x modules/custom/alternative_frontpage/src/Form/AlternativeFrontpageSettings.php \Drupal\alternative_frontpage\Form\AlternativeFrontpageSettings::isAllowedPath()
- 10.2.x modules/custom/alternative_frontpage/src/Form/AlternativeFrontpageSettings.php \Drupal\alternative_frontpage\Form\AlternativeFrontpageSettings::isAllowedPath()
Checks if a path is allowed.
Some paths are not allowed, e.g. /user/logout or /ajax.
Parameters
string $path: Path to check.
Return value
bool Returns true when path is allowed.
1 call to AlternativeFrontpageSettings::isAllowedPath()
- AlternativeFrontpageSettings::validateForm in modules/
custom/ alternative_frontpage/ src/ Form/ AlternativeFrontpageSettings.php - Form validation handler.
File
- modules/
custom/ alternative_frontpage/ src/ Form/ AlternativeFrontpageSettings.php, line 133
Class
- AlternativeFrontpageSettings
- Class AlternativeFrontpageSettings.
Namespace
Drupal\alternative_frontpage\FormCode
private function isAllowedPath($path) {
$unallowed_paths = [
'/user/logout',
'/ajax',
];
foreach ($unallowed_paths as $unallowed_path) {
if ($unallowed_path === substr($path, 0, strlen($unallowed_path))) {
return FALSE;
}
}
return TRUE;
}