DRUPAL_ROOT

Defines the root directory of the Drupal installation.

This strips two levels of directories off the current directory.

62 uses of DRUPAL_ROOT
BrowserHtmlDebugTrait::initBrowserOutputFile in core/tests/Drupal/Tests/BrowserHtmlDebugTrait.php
Creates the directory to store browser output.
ConfigInstallProfileUnmetDependenciesTest::copyTestingOverrides in core/modules/config/tests/src/Functional/ConfigInstallProfileUnmetDependenciesTest.php
Copy the testing_config_overrides install profile.
ConfigTranslationInstallTest::setUpLanguage in core/modules/config_translation/tests/src/Functional/ConfigTranslationInstallTest.php
Installer step: Select language.
CredentialForm::getDatabaseTypes in core/modules/migrate_drupal_ui/src/Form/CredentialForm.php
Returns all supported database driver installer objects.
CredentialFormTest::testCredentialFrom in core/modules/migrate_drupal_ui/tests/src/Functional/CredentialFormTest.php
Test the credential form.

... See full list

File

core/includes/bootstrap.inc, line 63

Code

define('DRUPAL_ROOT', dirname(__DIR__, 2));

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.