function Drupal::root
Same name in other branches
- 9 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
32 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_classloader_register in core/
includes/ bootstrap.inc - Registers an additional namespace.
File
-
core/
lib/ Drupal.php, line 180
Class
- Drupal
- Static Service Container wrapper.
Code
public static function root() {
return static::getContainer()->get('app.root');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.