You are here

function base_path in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/includes/common.inc \base_path()

Returns the base URL path (i.e., directory) of the Drupal installation.

base_path() adds a "/" to the beginning and end of the returned path if the path is not empty. At the very least, this will return "/".

Examples:

27 calls to base_path()
color_scheme_form_submit in core/modules/color/color.module
Form submission handler for color_scheme_form().
ContextualDynamicContextTest::testDifferentPermissions in core/modules/contextual/src/Tests/ContextualDynamicContextTest.php
Tests contextual links with different permissions.
DisplayBlockTest::testBlockContextualLinks in core/modules/block/src/Tests/Views/DisplayBlockTest.php
Tests the contextual links on a Views block.
DisplayTest::testPageContextualLinks in core/modules/views_ui/src/Tests/DisplayTest.php
Tests contextual links on Views page displays.
FieldPluginBase::renderText in core/modules/views/src/Plugin/views/field/FieldPluginBase.php
Performs an advanced text render for the item.

... See full list

2 string references to 'base_path'
FieldPluginBaseTest.php in core/modules/views/tests/src/Unit/Plugin/field/FieldPluginBaseTest.php
Contains \Drupal\Tests\views\Unit\Plugin\field\FieldPluginBaseTest.
LanguageNegotiationUrlTest.php in core/modules/language/tests/src/Unit/LanguageNegotiationUrlTest.php
Contains \Drupal\Tests\language\Unit\LanguageNegotiationUrlTest.

File

core/includes/common.inc, line 414
Common functions that many Drupal modules will need to reference.

Code

function base_path() {
  return $GLOBALS['base_path'];
}