You are here

constant DRUPAL_ROOT in Drupal 8

Same name and namespace in other branches
  1. 7 update.php \DRUPAL_ROOT
  2. 7 authorize.php \DRUPAL_ROOT
  3. 7 index.php \DRUPAL_ROOT
  4. 7 cron.php \DRUPAL_ROOT
  5. 7 install.php \DRUPAL_ROOT
  6. 7 xmlrpc.php \DRUPAL_ROOT
  7. 7 modules/statistics/statistics.php \DRUPAL_ROOT
  8. 7 modules/simpletest/tests/http.php \DRUPAL_ROOT
  9. 7 modules/simpletest/tests/https.php \DRUPAL_ROOT
  10. 9 core/includes/bootstrap.inc \DRUPAL_ROOT

Defines the root directory of the Drupal installation.

This strips two levels of directories off the current directory.

52 uses of DRUPAL_ROOT
BaseThemeDefaultDeprecationTest::setUpFilesystem in core/tests/Drupal/KernelTests/Core/Theme/BaseThemeDefaultDeprecationTest.php
Sets up the filesystem, so things like the file directory.
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.

... See full list

File

core/includes/bootstrap.inc, line 192
Functions that need to be loaded on every Drupal request.

Code

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