function SandboxManagerBase::getStagingRoot

Returns the directory where stage directories will be created.

Return value

string The absolute path of the directory containing the stage directories managed by this class.

1 call to SandboxManagerBase::getStagingRoot()
SandboxManagerBase::getSandboxDirectory in core/modules/package_manager/src/SandboxManagerBase.php
Returns the path of the directory where changes should be staged.

File

core/modules/package_manager/src/SandboxManagerBase.php, line 779

Class

SandboxManagerBase
Creates and manages a stage directory in which to install or update code.

Namespace

Drupal\package_manager

Code

private function getStagingRoot() : string {
  // Since the stage root can depend on site settings, store it so that
  // things won't break if the settings change during this stage's life
  // cycle.
  $dir = $this->tempStore
    ->get(self::TEMPSTORE_STAGING_ROOT_KEY);
  if (empty($dir)) {
    $dir = $this->pathLocator
      ->getStagingRoot();
    $this->tempStore
      ->set(self::TEMPSTORE_STAGING_ROOT_KEY, $dir);
  }
  return $dir;
}

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