public static function Drupal::root in Drupal 8
Same name and namespace in other branches
- 9 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 - Contains \Drupal.
Class
- Drupal
- Static Service Container wrapper.
Code
public static function root() {
return static::getContainer()
->get('app.root');
}