function Drupal::root
Same name in other branches
- 8.9.x core/lib/Drupal.php \Drupal::root()
- 10 core/lib/Drupal.php \Drupal::root()
- 11.x core/lib/Drupal.php \Drupal::root()
Gets the app root.
Return value
string
30 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 229
Class
- Drupal
- Static Service Container wrapper.
Code
public static function root() {
return static::getContainer()->getParameter('app.root');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.