public static function Drupal::root in Drupal 9
Same name and namespace in other branches
- 8 core/lib/Drupal.php \Drupal::root()
Gets the app root.
Return value
string
27 calls to Drupal::root()
- color_get_info in core/
modules/ color/ color.module - Retrieves the Color module information for a particular theme.
- DatabaseVersionCheckUpdateTest::testUpdate in core/
modules/ system/ tests/ src/ Functional/ Update/ DatabaseVersionCheckUpdateTest.php - Tests that updates fail if the database does not meet the minimum version.
- DbCommandBase::getDatabaseConnection in core/
lib/ Drupal/ Core/ Command/ DbCommandBase.php - Parse input options decide on a database.
- drupal_check_profile in core/
includes/ install.inc - Checks an installation profile's requirements.
- drupal_required_modules in core/
includes/ module.inc - Returns an array of modules required by core.
File
- core/
lib/ Drupal.php, line 220
Class
- Drupal
- Static Service Container wrapper.
Code
public static function root() {
return static::getContainer()
->getParameter('app.root');
}