function AppRootFactory::get

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

Gets the app root.

Return value

string The app root.

File

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

Class

AppRootFactory
Gets the app root from the kernel.

Namespace

Drupal\Core

Code

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

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