function SitePathFactory::get

Same name in other branches
  1. 8.9.x core/lib/Drupal/Core/SitePathFactory.php \Drupal\Core\SitePathFactory::get()

Gets the site path.

Return value

string The site path.

File

core/lib/Drupal/Core/SitePathFactory.php, line 33

Class

SitePathFactory
Gets the site path from the kernel.

Namespace

Drupal\Core

Code

public function get() {
    return $this->drupalKernel
        ->getContainer()
        ->getParameter('site.path');
}

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