globals.api.php 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  1. <?php
  2. /**
  3. * @file
  4. * These are the global variables that Drupal uses.
  5. */
  6. use Drupal\Component\Utility\DeprecatedArray;
  7. /**
  8. * The insecure base URL of the Drupal installation.
  9. *
  10. * @see \Drupal\Core\DrupalKernel::initializeRequestGlobals()
  11. */
  12. global $base_insecure_url;
  13. /**
  14. * The base path of the Drupal installation.
  15. *
  16. * This will at least default to '/'.
  17. *
  18. * @see \Drupal\Core\DrupalKernel::initializeRequestGlobals()
  19. */
  20. global $base_path;
  21. /**
  22. * The root URL of the host, excluding the path.
  23. *
  24. * @see \Drupal\Core\DrupalKernel::initializeRequestGlobals()
  25. */
  26. global $base_root;
  27. /**
  28. * The secure base URL of the Drupal installation.
  29. *
  30. * @see \Drupal\Core\DrupalKernel::initializeRequestGlobals()
  31. */
  32. global $base_secure_url;
  33. /**
  34. * The base URL of the Drupal installation.
  35. *
  36. * @see \Drupal\Core\DrupalKernel::initializeRequestGlobals()
  37. */
  38. global $base_url;
  39. /**
  40. * Allows defining of site-specific service providers for the Drupal kernel.
  41. *
  42. * To define a site-specific service provider class, use code like this:
  43. * @code
  44. * $GLOBALS['conf']['container_service_providers']['MyClassName'] = 'Drupal\My\Namespace\MyClassName';
  45. * @endcode
  46. *
  47. * @see \Drupal\Core\DrupalKernel::$serviceProviderClasses
  48. */
  49. global $conf;
  50. /**
  51. * Array of configuration overrides from the settings.php file.
  52. */
  53. global $config;
  54. /**
  55. * The location of file system directories used for site configuration data.
  56. *
  57. * @deprecated in drupal:8.8.0 and is removed from drupal:9.0.0. Use
  58. * \Drupal\Core\Site\Settings::get('config_sync_directory') instead.
  59. *
  60. * @see https://www.drupal.org/node/3018145
  61. */
  62. global $config_directories;
  63. /**
  64. * Store settings and profile information during installation process.
  65. *
  66. * @see install_drupal()
  67. */
  68. global $install_state;
  69. /**
  70. * Array of the number of items per page for each pager.
  71. *
  72. * The array index is the pager element index (0 by default).
  73. *
  74. * @deprecated in drupal:8.8.0 and is removed from drupal:9.0.0. Do not
  75. * directly set or get values from this array. Use the pager.manager service
  76. * instead.
  77. *
  78. * @see https://www.drupal.org/node/2779457
  79. * @see \Drupal\Core\Pager\PagerManagerInterface
  80. */
  81. $GLOBALS['pager_limits'] = new DeprecatedArray([], 'Global variable $pager_limits is deprecated in drupal:8.8.0 and is removed in drupal:9.0.0. Use \Drupal\Core\Pager\PagerManagerInterface instead. See https://www.drupal.org/node/2779457');
  82. /**
  83. * Array of current page numbers for each pager.
  84. *
  85. * The array index is the pager element index (0 by default).
  86. *
  87. * @deprecated in drupal:8.8.0 and is removed from drupal:9.0.0. Do not
  88. * directly set or get values from this array. Use the pager.manager service
  89. * instead.
  90. *
  91. * @see https://www.drupal.org/node/2779457
  92. * @see \Drupal\Core\Pager\PagerManagerInterface
  93. */
  94. $GLOBALS['pager_page_array'] = new DeprecatedArray([], 'Global variable $pager_page_array is deprecated in drupal:8.8.0 and is removed in drupal:9.0.0. Use \Drupal\Core\Pager\PagerManagerInterface instead. See https://www.drupal.org/node/2779457');
  95. /**
  96. * Array of the total number of pages for each pager.
  97. *
  98. * The array index is the pager element index (0 by default).
  99. *
  100. * @deprecated in drupal:8.8.0 and is removed from drupal:9.0.0. Do not
  101. * directly set or get values from this array. Use the pager.manager service
  102. * instead.
  103. *
  104. * @see https://www.drupal.org/node/2779457
  105. * @see \Drupal\Core\Pager\PagerManagerInterface
  106. */
  107. $GLOBALS['pager_total'] = new DeprecatedArray([], 'Global variable $pager_total is deprecated in drupal:8.8.0 and is removed in drupal:9.0.0. Use \Drupal\Core\Pager\PagerManagerInterface instead. See https://www.drupal.org/node/2779457');
  108. /**
  109. * Array of the total number of items for each pager.
  110. *
  111. * The array index is the pager element index (0 by default).
  112. *
  113. * @deprecated in drupal:8.8.0 and is removed from drupal:9.0.0. Do not
  114. * directly set or get values from this array. Use the pager.manager service
  115. * instead.
  116. *
  117. * @see https://www.drupal.org/node/2779457
  118. * @see \Drupal\Core\Pager\PagerManagerInterface
  119. */
  120. $GLOBALS['pager_total_items'] = new DeprecatedArray([], 'Global variable $pager_total_items is deprecated in drupal:8.8.0 and is removed in drupal:9.0.0. Use \Drupal\Core\Pager\PagerManagerInterface instead. See https://www.drupal.org/node/2779457');