Issue #3293431 by longwave: Remove obsolete AppRootFactory and SitePathFactory
(cherry picked from commit 9abad5716084f2ec3a27c6597c16abb0311897e6)merge-requests/2357/merge
parent
beb9503c8f
commit
8438ad61fd
|
@ -1,37 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
namespace Drupal\Core;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the app root from the kernel.
|
|
||||||
*/
|
|
||||||
class AppRootFactory {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The Drupal kernel.
|
|
||||||
*
|
|
||||||
* @var \Drupal\Core\DrupalKernelInterface
|
|
||||||
*/
|
|
||||||
protected $drupalKernel;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Constructs an AppRootFactory instance.
|
|
||||||
*
|
|
||||||
* @param \Drupal\Core\DrupalKernelInterface $drupal_kernel
|
|
||||||
* The Drupal kernel.
|
|
||||||
*/
|
|
||||||
public function __construct(DrupalKernelInterface $drupal_kernel) {
|
|
||||||
$this->drupalKernel = $drupal_kernel;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the app root.
|
|
||||||
*
|
|
||||||
* @return string
|
|
||||||
* The app root.
|
|
||||||
*/
|
|
||||||
public function get() {
|
|
||||||
return $this->drupalKernel->getContainer()->getParameter('app.root');
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,37 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
namespace Drupal\Core;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the site path from the kernel.
|
|
||||||
*/
|
|
||||||
class SitePathFactory {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The Drupal kernel.
|
|
||||||
*
|
|
||||||
* @var \Drupal\Core\DrupalKernelInterface
|
|
||||||
*/
|
|
||||||
protected $drupalKernel;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Constructs a 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->getContainer()->getParameter('site.path');
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
Loading…
Reference in New Issue