Mercurial > hg > isophonics-drupal-site
view core/lib/Drupal/Core/SitePathFactory.php @ 17:129ea1e6d783
Update, including to Drupal core 8.6.10
author | Chris Cannam |
---|---|
date | Thu, 28 Feb 2019 13:21:36 +0000 |
parents | 4c8ae668cc8c |
children |
line wrap: on
line source
<?php namespace Drupal\Core; /** * Gets the site path from the kernel. */ class SitePathFactory { /** * The Drupal kernel. * * @var \Drupal\Core\DrupalKernelInterface */ protected $drupalKernel; /** * Constructs an SitePathFactory instance. * * @param \Drupal\Core\DrupalKernelInterface $drupal_kernel * The Drupal kernel. */ public function __construct(DrupalKernelInterface $drupal_kernel) { $this->drupalKernel = $drupal_kernel; } /** * Gets the site path. * * @return string * The site path. */ public function get() { return $this->drupalKernel->getSitePath(); } }