function SystemTestController::getInstallProfile
Same name and namespace in other branches
- 11.x core/modules/system/tests/modules/system_test/src/Controller/SystemTestController.php \Drupal\system_test\Controller\SystemTestController::getInstallProfile()
- 10 core/modules/system/tests/modules/system_test/src/Controller/SystemTestController.php \Drupal\system_test\Controller\SystemTestController::getInstallProfile()
- 9 core/modules/system/tests/modules/system_test/src/Controller/SystemTestController.php \Drupal\system_test\Controller\SystemTestController::getInstallProfile()
- 8.9.x core/modules/system/tests/modules/system_test/src/Controller/SystemTestController.php \Drupal\system_test\Controller\SystemTestController::getInstallProfile()
Use a plain Symfony response object to output the current install_profile.
Attributes
#[Route(path: '/system-test/get-install-profile', name: 'system_test.install_profile', requirements: [
'_access' => 'TRUE',
])]
File
-
core/
modules/ system/ tests/ modules/ system_test/ src/ Controller/ SystemTestController.php, line 623
Class
- SystemTestController
- Controller routines for system_test routes.
Namespace
Drupal\system_test\ControllerCode
public function getInstallProfile() {
$install_profile = \Drupal::installProfile() ?: 'NONE';
return new Response('install_profile: ' . $install_profile);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.